URL: <http://savannah.gnu.org/bugs/?42817>
Summary: tautological comparisons Project: GNU MIX Development Kit Submitted by: ryandesign Submitted on: Mon 21 Jul 2014 07:17:57 AM GMT Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: While compiling the latest code in your repository using the Apple LLVM compiler v5.1 (a.k.a. clang) the following warnings were displayed: mix_vm.c:531:23: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare] return errors[(code < 0 || code > MIX_VM_ERROR_UNEXPECTED) ~~~~ ^ ~ xmix_vm_handlers.c:1385:12: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (line < 0) ~~~~ ^ ~ mixgtk_widgets.c:127:20: warning: comparison of constant 32 with expression of type 'mixgtk_widget_id_t' is always true [-Wtautological-constant-out-of-range-compare] g_assert (widget < WIDGET_NO_); ~~~~~~ ^ ~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gtestutils.h:88:59: note: expanded from macro 'g_assert' #define g_assert(expr) do { if G_LIKELY (expr) ; else \ ^ /opt/local/include/glib-2.0/glib/gmacros.h:309:59: note: expanded from macro 'G_LIKELY' #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 1)) ^ /opt/local/include/glib-2.0/glib/gmacros.h:303:8: note: expanded from macro '_G_BOOLEAN_EXPR' if (expr) \ ^ These warnings may indicate code that can be removed or simplified. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?42817> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ bug-mdk mailing list bug-mdk@gnu.org https://lists.gnu.org/mailman/listinfo/bug-mdk