Sat, 28 Sep 2013 12:42:22 -0700
8025613: clang: remove -Wno-unused-value
Reviewed-by: iveresov
1.1 --- a/agent/src/os/linux/LinuxDebuggerLocal.c Sat Sep 28 12:32:10 2013 +0400 1.2 +++ b/agent/src/os/linux/LinuxDebuggerLocal.c Sat Sep 28 12:42:22 2013 -0700 1.3 @@ -29,6 +29,7 @@ 1.4 #include <sys/types.h> 1.5 #include <sys/stat.h> 1.6 #include <fcntl.h> 1.7 +#include <stdlib.h> 1.8 #include <string.h> 1.9 #include <limits.h> 1.10 1.11 @@ -80,7 +81,7 @@ 1.12 (JNIEnv *env, jclass cls) { 1.13 jclass listClass; 1.14 1.15 - if (init_libproc(getenv("LIBSAPROC_DEBUG")) != true) { 1.16 + if (init_libproc(getenv("LIBSAPROC_DEBUG") != NULL) != true) { 1.17 THROW_NEW_DEBUGGER_EXCEPTION("can't initialize libproc"); 1.18 } 1.19
2.1 --- a/agent/src/os/linux/ps_proc.c Sat Sep 28 12:32:10 2013 +0400 2.2 +++ b/agent/src/os/linux/ps_proc.c Sat Sep 28 12:42:22 2013 -0700 2.3 @@ -27,6 +27,8 @@ 2.4 #include <string.h> 2.5 #include <signal.h> 2.6 #include <errno.h> 2.7 +#include <sys/types.h> 2.8 +#include <sys/wait.h> 2.9 #include <sys/ptrace.h> 2.10 #include "libproc_impl.h" 2.11
3.1 --- a/agent/src/os/linux/salibelf.c Sat Sep 28 12:32:10 2013 +0400 3.2 +++ b/agent/src/os/linux/salibelf.c Sat Sep 28 12:42:22 2013 -0700 3.3 @@ -25,6 +25,7 @@ 3.4 #include "salibelf.h" 3.5 #include <stdlib.h> 3.6 #include <unistd.h> 3.7 +#include <string.h> 3.8 3.9 extern void print_debug(const char*,...); 3.10
4.1 --- a/agent/src/os/linux/symtab.c Sat Sep 28 12:32:10 2013 +0400 4.2 +++ b/agent/src/os/linux/symtab.c Sat Sep 28 12:42:22 2013 -0700 4.3 @@ -305,7 +305,7 @@ 4.4 4.5 unsigned char *bytes 4.6 = (unsigned char*)(note+1) + note->n_namesz; 4.7 - unsigned char *filename 4.8 + char *filename 4.9 = (build_id_to_debug_filename (note->n_descsz, bytes)); 4.10 4.11 fd = pathmap_open(filename);
5.1 --- a/make/bsd/makefiles/gcc.make Sat Sep 28 12:32:10 2013 +0400 5.2 +++ b/make/bsd/makefiles/gcc.make Sat Sep 28 12:42:22 2013 -0700 5.3 @@ -247,7 +247,7 @@ 5.4 5.5 ifeq ($(USE_CLANG), true) 5.6 # However we need to clean the code up before we can unrestrictedly enable this option with Clang 5.7 - WARNINGS_ARE_ERRORS += -Wno-unused-value -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses 5.8 + WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses 5.9 WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-compare 5.10 # Not yet supported by clang in Xcode 4.6.2 5.11 # WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare 5.12 @@ -262,7 +262,7 @@ 5.13 # conversions which might affect the values. Only enable it in earlier versions. 5.14 WARNING_FLAGS = -Wunused-function 5.15 ifeq ($(USE_CLANG),) 5.16 - WARNINGS_FLAGS += -Wconversion 5.17 + WARNING_FLAGS += -Wconversion 5.18 endif 5.19 endif 5.20
6.1 --- a/make/linux/makefiles/gcc.make Sat Sep 28 12:32:10 2013 +0400 6.2 +++ b/make/linux/makefiles/gcc.make Sat Sep 28 12:42:22 2013 -0700 6.3 @@ -208,7 +208,7 @@ 6.4 6.5 ifeq ($(USE_CLANG), true) 6.6 # However we need to clean the code up before we can unrestrictedly enable this option with Clang 6.7 - WARNINGS_ARE_ERRORS += -Wno-unused-value -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses 6.8 + WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses 6.9 WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare 6.10 WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess 6.11 WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
7.1 --- a/src/cpu/x86/vm/assembler_x86.cpp Sat Sep 28 12:32:10 2013 +0400 7.2 +++ b/src/cpu/x86/vm/assembler_x86.cpp Sat Sep 28 12:42:22 2013 -0700 7.3 @@ -4769,7 +4769,7 @@ 7.4 } 7.5 7.6 void Assembler::adcq(Register dst, Register src) { 7.7 - (int) prefixq_and_encode(dst->encoding(), src->encoding()); 7.8 + (void) prefixq_and_encode(dst->encoding(), src->encoding()); 7.9 emit_arith(0x13, 0xC0, dst, src); 7.10 } 7.11 7.12 @@ -4824,7 +4824,7 @@ 7.13 } 7.14 7.15 void Assembler::andq(Register dst, Register src) { 7.16 - (int) prefixq_and_encode(dst->encoding(), src->encoding()); 7.17 + (void) prefixq_and_encode(dst->encoding(), src->encoding()); 7.18 emit_arith(0x23, 0xC0, dst, src); 7.19 } 7.20
8.1 --- a/src/share/vm/classfile/defaultMethods.cpp Sat Sep 28 12:32:10 2013 +0400 8.2 +++ b/src/share/vm/classfile/defaultMethods.cpp Sat Sep 28 12:42:22 2013 -0700 8.3 @@ -977,7 +977,7 @@ 8.4 return target; 8.5 } 8.6 8.7 -#ifndef PRODUCT 8.8 +#ifdef ASSERT 8.9 // Return true is broad type is a covariant return of narrow type 8.10 static bool covariant_return_type(BasicType narrow, BasicType broad) { 8.11 if (narrow == broad) { 8.12 @@ -988,7 +988,7 @@ 8.13 } 8.14 return false; 8.15 } 8.16 -#endif // ndef PRODUCT 8.17 +#endif 8.18 8.19 static int assemble_redirect( 8.20 BytecodeConstantPool* cp, BytecodeBuffer* buffer, 8.21 @@ -1281,4 +1281,3 @@ 8.22 MetadataFactory::free_array(cld, original_ordering); 8.23 } 8.24 } 8.25 -