#3794: Complier warnings on OS X 10.11.1 with Xcode 7.1.1
---------------------+---------------------
  Reporter:  chdiza  |      Owner:  brendan
      Type:  defect  |     Status:  new
  Priority:  minor   |  Milestone:
 Component:  SMTP    |    Version:
Resolution:          |   Keywords:
---------------------+---------------------

Comment (by vinc17):

 Replying to [comment:3 kevin8t8]:
 > Would something like
 > {{{
 >   while (a && *a && !(*a & (1<<7))
 > }}}
 > work?

 I find this ugly. The code should not be made unreadable just to try to
 avoid compiler bugs. Moreover, for signed char, this could make the code
 slower. It would be better to provide the {{{-Wno-tautological-constant-
 out-of-range-compare}}} GCC option to avoid the useless warning.

 Also, the test on {{{a}}} should be done only at the beginning of the
 function:
 {{{
   if (!a)
     return 0;
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3794#comment:6>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to