lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Nagev Boris wrote (amongst other interesting things):

if (depth == 0)
luasdorintf("%-5i | ", stackIndex);
else
luasdorintf("       ", stackIndex);
do_another_thing(); //oops, not conditional

The latest release of GCC (GCC 6) includes a new warning: -Wmisleading-indentation.
This feature was added in December last year.

David Malcolm, the Red Hat developer who contributed the feature, motivated
partly by the "goto fail" fault in SSL checking, has a blog post on the
warning:

        https://developerblog.redhat.com/2016/02/26/gcc-6-wmisleading-indentation-vs-goto-fail/

--

David A. Wheeler's paper "The Apple goto fail vulnerability: lessons learned" at:

        http://www.dwheeler.com/essays/apple-goto-fail.html

also suggests this warning as one of the things that could help serve as a
countermeasure to pick up this defect.

--

cheers,

s-b etc.