Ethereal-dev: [Ethereal-dev] "Interesting" code in gtk/ansi_map_stat.c and gtk/isup_stat.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Sun, 21 Dec 2003 14:04:52 +0100
Compiling both files results in the following warning:

ansi_map_stat.c:102: warning: comparison is always false due to limited range of data type
isup_stat.c:102: warning: comparison is always false due to limited range of data type

    if (data_p->message_type > sizeof(stat.message_type))

where data_p->message_type is guint8 and stat.message_type is int message_type[0xff]
and thus 1020 is alwas greater than the contents of a guint8.

Can someone knowledgeable of the code please take a look ?

Thanks
   Jörg

-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.