mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
5b15ea1e00
Labels always require a statement behind that. GCC permits declarations for some reason, but it's against the standard and clang (rightfully) rejects this. Adding an empty statement to work around this.
24 lines
518 B
Diff
24 lines
518 B
Diff
C Standard says in 6.8.1:
|
|
|
|
labeled-statement:
|
|
identifier : statement
|
|
case constant-expression : statement
|
|
default : statement
|
|
|
|
Notably, only expressions and no declarations are allowed. A common workaround for this
|
|
is adding an empty statement.
|
|
|
|
diff --git a/src/rep-budget.c b/src/rep-budget.c
|
|
index eb5cce6..61e2e77 100644
|
|
--- a/src/rep-budget.c
|
|
+++ b/src/rep-budget.c
|
|
@@ -255,7 +255,7 @@ gint tmpmode;
|
|
}
|
|
else
|
|
{
|
|
-libname:
|
|
+libname: ;
|
|
gchar *name;
|
|
|
|
gtk_tree_model_get(model, iter,
|