[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-mdk] [bug #42817] tautological comparisons
From: |
Ryan Schmidt |
Subject: |
[bug-mdk] [bug #42817] tautological comparisons |
Date: |
Mon, 21 Jul 2014 07:17:58 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.77.4 (KHTML, like Gecko) Version/7.0.5 Safari/537.77.4 |
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/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-mdk] [bug #42817] tautological comparisons,
Ryan Schmidt <=