! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce-dialogs.c:477: suspicious expression ?
Status:
RESOLVED: INVALID
Product:
Libxfce4ui
Component:
General

Comments

Description David Binderman 2018-02-20 09:27:16 CET
xfce-dialogs.c:477]: (warning) The expression 'strcmp(stock_id,"yes") != 0' is suspicious. It overlaps 'strcmp(stock_id,"gtk-yes") == 0'.

Source code is

  if (stock_id != NULL && (strcmp (stock_id, "gtk-yes") == 0 || strcmp (stock_id, "yes")) == 0)

Maybe better code

  if (stock_id != NULL && (strcmp (stock_id, "gtk-yes") == 0 || strcmp (stock_id, "yes") == 0))
Comment 1 Andre Miranda editbugs 2018-02-24 23:31:22 CET
This has been fixed in:
https://git.xfce.org/xfce/libxfce4ui/commit/?id=e3c255de0b38be5eb92cfaf3ef7243b2c4817dc6

This bug's version says git, are you building from current git master or at least libxfce4ui-4.13.3?
Comment 2 David Binderman 2018-02-26 08:25:35 CET
I am building from fedora rawhide i.e. libxfce4ui-4.12.1

It looks like I used an out of date version. My apologies for the bug report.

Bug #14234

Reported by:
David Binderman
Reported on: 2018-02-20
Last modified on: 2018-02-26

People

Assignee:
Nick Schermer
CC List:
3 users

Version

Attachments

Additional information