Skip to content

Commit

Permalink
net/rfkill/core.c: work around gcc-4.0.2 silliness
Browse files Browse the repository at this point in the history
net/rfkill/core.c: In function 'rfkill_type_show':
net/rfkill/core.c:610: warning: control may reach end of non-void function 'rfkill_get_type_str' being inlined

A gcc bug, but simple enough to squish.

Cc: John W. Linville <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
akpm00 authored and linvjw committed Dec 7, 2009
1 parent 16cec43 commit 02f7f17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/rfkill/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,8 @@ static ssize_t rfkill_name_show(struct device *dev,

static const char *rfkill_get_type_str(enum rfkill_type type)
{
BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_FM + 1);

switch (type) {
case RFKILL_TYPE_WLAN:
return "wlan";
Expand All @@ -597,8 +599,6 @@ static const char *rfkill_get_type_str(enum rfkill_type type)
default:
BUG();
}

BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_FM + 1);
}

static ssize_t rfkill_type_show(struct device *dev,
Expand Down

0 comments on commit 02f7f17

Please sign in to comment.