(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/hostlist_table.c) |
| |
| 249 | | | hostlist_sort_column(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) |
| 250 | | | { |
| 251 | | | char *text1 = NULL; |
| 252 | | | char *text2 = NULL; |
| 253 | | | guint64 i1, i2; |
| 254 | | | |
| 255 | | | const GtkCListRow *row1 = ptr1; |
| 256 | | | const GtkCListRow *row2 = ptr2; |
| 257 | | | |
| 258 | | | text1 = GTK_CELL_TEXT (row1->cell[clist->sort_column])->text;
x /usr/include/gtk-2.0/gtk/gtkclist.h |
| |
112 | #define GTK_CELL_TEXT(cell) (((GtkCellText *) &(cell))) |
| |
|
| 259 | | | text2 = GTK_CELL_TEXT (row2->cell[clist->sort_column])->text;
x /usr/include/gtk-2.0/gtk/gtkclist.h |
| |
112 | #define GTK_CELL_TEXT(cell) (((GtkCellText *) &(cell))) |
| |
|
| 260 | | | |
| 261 | | | if (clist->sort_column >= 2 && clist->sort_column <= 7) { |
| 262 | | | sscanf(text1, "%" G_GINT64_MODIFIER "u", &i1); |
| 263 | | | sscanf(text2, "%" G_GINT64_MODIFIER "u", &i2); |
Ignored Return Value
The return value of __isoc99_sscanf() is never checked in the highlighted execution scenario. - If the return value can indicate an error, the error will be ignored if the highlighted code executes.
- CodeSonar is configured to enforce Ignored Return Value checks for __isoc99_sscanf(). (To change the set of enforced Ignored Return Value checks, use configuration file parameters RETURN_CHECKER_CHECKED_FUNCS and RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 264 | | | if (i1 > i2) { |
Event 2:
Taking false branch. i1 > i2 evaluates to false.
hide
|
|
| 265 | | | return 1; |
| 266 | | | } else if (i1 < i2) { |
Event 3:
Taking false branch. i1 < i2 evaluates to false.
hide
|
|
| 267 | | | return -1; |
| 268 | | | } else { |
| 269 | | | return 0; |
| 270 | | | } |
| 271 | | | } else { |
| 272 | | | return strcmp (text1, text2); |
| 273 | | | } |
| 274 | | | g_assert_not_reached();
x /usr/include/glib-2.0/glib/gtestutils.h |
| |
73 | #define g_assert_not_reached() do { g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); } while (0) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
160 | # define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) |
| |
|
| 275 | | | |
| 276 | | | |
| 277 | | | |
| 278 | | | gtk_clist_thaw(clist); |
| 279 | | | gtk_clist_freeze(clist); |
| 280 | | | |
| 281 | | | return 0; |
| 282 | | | } |
| |