public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* trivial patches: Should we care about control reaches end of non-void function
@ 2008-10-15 18:07 Steve Kemp
  2008-10-15 21:33 ` [PATCH] compiler warning cleanup Steve Kemp
  2008-10-15 22:26 ` trivial patches: Should we care about control reaches end of non-void function Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Steve Kemp @ 2008-10-15 18:07 UTC (permalink / raw)
  To: linux-kernel

  During my build processes I see a lot of messages like this:

  In function xxx:
 xxx.c:123: control reaches end of non-void function

  These are typically caused by constructs like:

    static int some_function()
    {
        switch (blah) {
        ...

        default:
            BUG();
        }
    }

  I see some functions in the kernel have added "return 0" after the
 BUG, presumably to silence these warnings.  Would a patch to do this
 consistently, or is that too trivial even for trivial patches?

  Actual example:
    ./mm/mempolicy.c
        policy_zonelist - gives this warning.
        slab_node       - gives this warning
        __mpol_equal    - has the warning silenced via explicit return.

Steve
-- 
Managed Anti-Spam Service
http://mail-scanning.com/


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-16  6:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 18:07 trivial patches: Should we care about control reaches end of non-void function Steve Kemp
2008-10-15 21:33 ` [PATCH] compiler warning cleanup Steve Kemp
2008-10-15 22:26 ` trivial patches: Should we care about control reaches end of non-void function Alan Cox
2008-10-16  6:08   ` Steve Kemp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox