[gnome-bluetooth/wip/jtojnar/label: 6/6] lib: Fix syntax error on clang and older gcc
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/jtojnar/label: 6/6] lib: Fix syntax error on clang and older gcc
- Date: Tue, 22 Feb 2022 14:10:49 +0000 (UTC)
commit ecfd5beef6b3606dcf360783be21f8d74cbfbd13
Author: Jan Tojnar <jtojnar gmail com>
Date: Thu Feb 17 02:35:44 2022 +0000
lib: Fix syntax error on clang and older gcc
On gcc < 11 and any version of clang (tested up to 13),
the build would fail with the following error:
error: label at end of compound statement
GCC 11+ seems to only complain with -Werror -Wpedantic,
otherwise it tollerates even completely empty default: case.
lib/bluetooth-utils.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/lib/bluetooth-utils.c b/lib/bluetooth-utils.c
index aafbbf08..4a208c58 100644
--- a/lib/bluetooth-utils.c
+++ b/lib/bluetooth-utils.c
@@ -94,10 +94,8 @@ bluetooth_type_to_string (BluetoothType type)
case BLUETOOTH_TYPE_SPEAKERS:
return _("Speakers");
default:
- /* fallthrough */
+ return _("Unknown");
}
-
- return _("Unknown");
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]