mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 11:42:21 +00:00
ttsnoop: adjust data types to ensure the result of pointer comparison is
correct.
This commit is contained in:
parent
a25a32157f
commit
75a4e93d38
1 changed files with 13 additions and 12 deletions
|
@ -339,6 +339,7 @@ choiceOkayed(
|
||||||
_DtTtChooserAction choice = (_DtTtChooserAction)ival;
|
_DtTtChooserAction choice = (_DtTtChooserAction)ival;
|
||||||
Widget label = dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label;
|
Widget label = dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label;
|
||||||
switch (choice) {
|
switch (choice) {
|
||||||
|
void *pval;
|
||||||
int ival, fd;
|
int ival, fd;
|
||||||
Tt_message msg;
|
Tt_message msg;
|
||||||
Tt_pattern pat;
|
Tt_pattern pat;
|
||||||
|
@ -396,9 +397,9 @@ choiceOkayed(
|
||||||
if (text == 0) {
|
if (text == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ival = 0;
|
pval = NULL;
|
||||||
sscanf( text, "%i", &ival );
|
sscanf( text, "%p", &pval );
|
||||||
msg = (Tt_message) (intptr_t) ival;
|
msg = (Tt_message) (intptr_t) pval;
|
||||||
if (DtTtIndex( DTTT_MESSAGE, msg ) < 0) {
|
if (DtTtIndex( DTTT_MESSAGE, msg ) < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -431,9 +432,9 @@ choiceOkayed(
|
||||||
if (text == 0) {
|
if (text == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ival = 0;
|
pval = NULL;
|
||||||
sscanf( text, "%i", &ival );
|
sscanf( text, "%p", &pval );
|
||||||
pat = (Tt_pattern) (intptr_t) ival;
|
pat = (Tt_pattern) (intptr_t) pval;
|
||||||
if (DtTtIndex( DTTT_PATTERN, pat ) < 0) {
|
if (DtTtIndex( DTTT_PATTERN, pat ) < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -465,9 +466,9 @@ choiceOkayed(
|
||||||
if (text == 0) {
|
if (text == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ival = 0;
|
pval = NULL;
|
||||||
sscanf( text, "%i", &ival );
|
sscanf( text, "%p", &pval );
|
||||||
pats = (Tt_pattern *) (intptr_t) ival;
|
pats = (Tt_pattern *) (intptr_t) pval;
|
||||||
if (DtTtIndex( DTTT_DTSESSION, pats ) < 0) {
|
if (DtTtIndex( DTTT_DTSESSION, pats ) < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -491,9 +492,9 @@ choiceOkayed(
|
||||||
if (text == 0) {
|
if (text == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ival = 0;
|
pval = NULL;
|
||||||
sscanf( text, "%i", &ival );
|
sscanf( text, "%p", &pval );
|
||||||
pats = (Tt_pattern *) (intptr_t) ival;
|
pats = (Tt_pattern *) (intptr_t) pval;
|
||||||
if (DtTtIndex( DTTT_DTFILE, pats ) < 0) {
|
if (DtTtIndex( DTTT_DTFILE, pats ) < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue