GNOME Bugzilla – Bug 719504
openfiles.cpp:165: possible bad expression ?
Last modified: 2013-11-28 22:14:15 UTC
I just ran the static analyser cppcheck over the source code of gnome-system-monitor-3.11.2 It said [openfiles.cpp:165] -> [openfiles.cpp:165]: (style) Same expression on both sides of '=='. Source code is return (o1->fd == o2->fd) && (o1->type == o1->type); /* XXX! */ Suggest new code return (o1->fd == o2->fd) && (o1->type == o2->type); /* XXX! */
Thanks for spotting that, I agree that that must be a typo, and will apply the patch. Anything else from cppcheck? Could you describe how did you run cppcheck (I have never used it) for me to learn something new? :) BTW, I've already committed the fix. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
>Anything else from cppcheck? Most unusually for the packages in Fedora 20, no. >Could you describe how did you run cppcheck I've modified the C and C++ compilers to also run cppcheck over all the source code that the compilers see. cppcheck --enable=all --std=posix whatever.c is the command I use. You may wish to consider using cppcheck as part of your development process. It is available from sourceforge.