aboutsummaryrefslogtreecommitdiffstats
path: root/src/zsets.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-14 17:56:37 +0100
committerMattias Andrée <maandree@kth.se>2016-03-14 17:56:37 +0100
commitb2c44d8c961090c2773f3a98d12fcafc7f5c5b2b (patch)
tree8d7d19fd6ebd768023b3030d3e7b69d985fbf1c5 /src/zsets.c
parentFix so that no workaround is required. (diff)
downloadlibzahl-b2c44d8c961090c2773f3a98d12fcafc7f5c5b2b.tar.gz
libzahl-b2c44d8c961090c2773f3a98d12fcafc7f5c5b2b.tar.bz2
libzahl-b2c44d8c961090c2773f3a98d12fcafc7f5c5b2b.tar.xz
Mostly optimisations
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/zsets.c')
-rw-r--r--src/zsets.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/zsets.c b/src/zsets.c
index bddc9ec..e1506f6 100644
--- a/src/zsets.c
+++ b/src/zsets.c
@@ -3,6 +3,10 @@
#include <ctype.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wswitch-default"
+#endif
+
int
zsets(z_t a, const char *str)
@@ -44,7 +48,7 @@ zsets(z_t a, const char *str)
}
}
- if (neg)
+ if (unlikely(neg))
SET_SIGNUM(a, -zsignum(a));
return 0;
}