GNOME Bugzilla – Bug 755548
atktablecell.c:275: bad comparison ?
Last modified: 2015-09-24 15:10:42 UTC
atktablecell.c:275:47: warning: ordered comparison of pointer with integer zero [-Wextra] return (row != 0 && column != 0 && row_span > 0 && column_span > 0); Maybe better code return (row != 0 && column != 0 && row_span != 0 && column_span != 0);
(In reply to dcb from comment #0) > atktablecell.c:275:47: warning: ordered comparison of pointer with integer > zero [-Wextra] > > return (row != 0 && column != 0 && row_span > 0 && column_span > 0); Yes, there is an error here. > Maybe better code > > return (row != 0 && column != 0 && row_span != 0 && column_span != 0); I disagree. The problem here is that we are receiving the pointers to store the info, but here we are using the pointer. Take a look to how column_span is computed for example: *column_span = atk_table_cell_get_column_span (cell); So the correct like would be something like this: return (*row != 0 && *column != 0 && *row_span > 0 && *column_span > 0); If you have time for writing a patch I would review it. If not I can do the change myself. Thanks for reporting.
>So the correct like would be something like this: > return (*row != 0 && *column != 0 && *row_span > 0 && *column_span > 0); Ok. >I can do the change myself. That's fine by me.
Fixed with commit 381c3f2d67e1a0d751cba03b81e5d28b2e9b309a Thanks for reporting.