[En-Nut-Discussion] STM32 share EXTI can not work properly, need some fix below

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Fri Sep 25 10:48:35 CEST 2015


>>>>> "Nathan" == Nathan Moore <nategoose at gmail.com> writes:

    >> 
    >> 
    >> Follows the Nut/OS coding rules (we never use '1 == x', always 'x ==
    >> 1')
    >> 
    >> 
    Nathan> Why is that?  While (x == 1) seems more natural (1 == x) is
    Nathan> safer since the accidental (1 = x) will generate a compiler
That was also my reasoning.
However recent gcc already generates a warning with "if (x = 1)", but more
complex expressions in the if clause will not.

In the meantime I switched again to the NutOs style.

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------


More information about the En-Nut-Discussion mailing list