classpath: fix this statement may fall through
authorGuo Li <uxgood.org@gmail.com>
Wed, 5 Sep 2018 07:27:19 +0000 (15:27 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Wed, 5 Sep 2018 18:07:47 +0000 (02:07 +0800)
gnu_java_math_GMP.c:1135:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
         res = mpz_popcount (_this);
         ~~~~^~~~~~~~~~~~~~~~~~~~~~
gnu_java_math_GMP.c:1136:7: note: here
       default:
       ^~~~~~~

Signed-off-by: Guo Li <uxgood.org@gmail.com>
libs/classpath/Makefile
libs/classpath/patches/020-fix-statement-may-fall-through.patch [new file with mode: 0644]

index b795ec9d7d9e8b5f5c70e04f0d6cdae2601ca0cf..39a8dbcb7118aca70b5530e0b5cfb7e695ee6773 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=classpath
 PKG_VERSION:=0.99
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
 
diff --git a/libs/classpath/patches/020-fix-statement-may-fall-through.patch b/libs/classpath/patches/020-fix-statement-may-fall-through.patch
new file mode 100644 (file)
index 0000000..b315757
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/native/jni/java-math/gnu_java_math_GMP.c
++++ b/native/jni/java-math/gnu_java_math_GMP.c
+@@ -1132,6 +1132,7 @@
+         break;
+       case 1:
+         res = mpz_popcount (_this);
++      __attribute__((fallthrough));
+       default:
+         JCL_ThrowException (env, "java/lang/Error",
+                             "Unexpected sign value for a native MPI");