[Xfce-bugs] [Bug 14234] New: xfce-dialogs.c:477: suspicious expression ?

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Tue Feb 20 09:27:16 CET 2018


https://bugzilla.xfce.org/show_bug.cgi?id=14234

            Bug ID: 14234
           Summary: xfce-dialogs.c:477: suspicious expression ?
    Classification: Xfce Core
           Product: Libxfce4ui
           Version: git
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: General
          Assignee: nick at xfce.org
          Reporter: dcb314 at hotmail.com
                CC: hjudt at xfce.org, xfce-bugs at xfce.org
  Target Milestone: 4.14

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))

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Xfce-bugs mailing list