summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81eab3b)
raw | patch | inline | side by side (parent: 81eab3b)
author | Florian Forster <octo@verplant.org> | |
Wed, 16 Feb 2011 08:45:35 +0000 (09:45 +0100) | ||
committer | Florian Forster <octo@verplant.org> | |
Wed, 16 Feb 2011 08:45:35 +0000 (09:45 +0100) |
Some verions of GGC don't notice that usage_qos_exit() won't return and
complain about the variables "prec" and "class" being used uninitalized.
This commit adds the "noreturn" attribute to that function and
initializes the variables. Thanks to James Bromberger for reporting this
problem.
complain about the variables "prec" and "class" being used uninitalized.
This commit adds the "noreturn" attribute to that function and
initializes the variables. Thanks to James Bromberger for reporting this
problem.
src/oping.c | patch | blob | history |
diff --git a/src/oping.c b/src/oping.c
index 7058ac0480ac82d6bd5cb5f700fb2c8d51a1d4c6..5ecfdbfa2cbeb16a165502943064262ce56c1020 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
exit (status);
} /* }}} void usage_exit */
+__attribute__((noreturn))
static void usage_qos_exit (const char *arg, int status) /* {{{ */
{
if (arg != 0)
&& (strlen (opt) == 4))
{
uint8_t dscp;
- uint8_t class;
- uint8_t prec;
+ uint8_t class = 0;
+ uint8_t prec = 0;
/* There are four classes, AF1x, AF2x, AF3x, and AF4x. */
if (opt[2] == '1')