bugGNU MIX Development Kit - Bugs: bug #42817, tautological comparisons


bug #42817: tautological comparisons

Submitted by:  Ryan Schmidt <ryandesign>
Submitted on:  Mon 21 Jul 2014 07:17:57 AM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  Jose Antonio Ortega Ruiz <jao>
Open/Closed:  Closed

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 03 Aug 2014 01:13:11 AM UTC, comment #1: 

I've pushed fixes for these warnings... please let me know if the work for you. Thanks!

Jose Antonio Ortega Ruiz <jao>
Project AdministratorIn charge of this item.
Mon 21 Jul 2014 07:17:57 AM UTC, original submission:  

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.

Ryan Schmidt <ryandesign>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jao (Updated the item)
  • -email is unavailable- added by ryandesign (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-08-05 jao StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2014-08-03 jao StatusIn Progress => Ready For Test
    2014-08-02 jao StatusNone => In Progress
        Assigned toNone => jao

    Back to the top

    Powered by Savane 3.7