[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081015180732.GA4119@steve.org.uk>
Date:	Wed, 15 Oct 2008 19:07:32 +0100
From:	Steve Kemp <steve@...ve.org.uk>
To:	linux-kernel@...r.kernel.org
Subject: trivial patches: Should we care about control reaches end of
	non-void function
  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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
