(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/service_response_time_table.c) |
| |
| 100 | | | srt_sort_column(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) |
| 101 | | | { |
| 102 | | | char *text1 = NULL; |
| 103 | | | char *text2 = NULL; |
| 104 | | | int i1, i2; |
| 105 | | | float f1,f2; |
| 106 | | | |
| 107 | | | const GtkCListRow *row1 = ptr1; |
| 108 | | | const GtkCListRow *row2 = ptr2; |
| 109 | | | |
| 110 | | | 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))) |
| |
|
| 111 | | | 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))) |
| |
|
| 112 | | | |
| 113 | | | switch(clist->sort_column){ |
| 114 | | | case 1: |
| 115 | | | return strcmp (text1, text2); |
| 116 | | | case 0: |
| 117 | | | case 2: |
| 118 | | | i1=atoi(text1); |
| 119 | | | i2=atoi(text2); |
| 120 | | | return i1-i2; |
| 121 | | | case 3: |
| 122 | | | case 4: |
| 123 | | | case 5: |
| 124 | | | sscanf(text1,"%f",&f1); |
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 |
|
| 125 | | | sscanf(text2,"%f",&f2); |
| 126 | | | if(fabs(f1-f2)<0.000005) |
| 127 | | | return 0; |
| 128 | | | if(f1>f2) |
| 129 | | | return 1; |
| 130 | | | return -1; |
| 131 | | | } |
| 132 | | | 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__)) |
| |
|
| 133 | | | return 0; |
| 134 | | | } |
| |