changeset 5816:5d4f299f934c

8025613: clang: remove -Wno-unused-value Reviewed-by: iveresov
author twisti
date Tue, 13 Feb 2018 04:45:41 +0000
parents 38911c620b07
children 220e4791ba8f
files agent/src/os/linux/LinuxDebuggerLocal.c agent/src/os/linux/ps_proc.c agent/src/os/linux/salibelf.c agent/src/os/linux/symtab.c src/cpu/x86/vm/assembler_x86.cpp
diffstat 5 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/agent/src/os/linux/LinuxDebuggerLocal.c	Tue Feb 13 04:34:43 2018 +0000
+++ b/agent/src/os/linux/LinuxDebuggerLocal.c	Tue Feb 13 04:45:41 2018 +0000
@@ -23,6 +23,7 @@
  */
 
 #include <jni.h>
+#include <stdlib.h>
 #include "libproc.h"
 
 #if defined(x86_64) && !defined(amd64)
@@ -73,7 +74,7 @@
   (JNIEnv *env, jclass cls) {
   jclass listClass;
 
-  if (init_libproc(getenv("LIBSAPROC_DEBUG")) != true) {
+  if (init_libproc(getenv("LIBSAPROC_DEBUG") != NULL) != true) {
      THROW_NEW_DEBUGGER_EXCEPTION("can't initialize libproc");
   }
 
--- a/agent/src/os/linux/ps_proc.c	Tue Feb 13 04:34:43 2018 +0000
+++ b/agent/src/os/linux/ps_proc.c	Tue Feb 13 04:45:41 2018 +0000
@@ -27,6 +27,8 @@
 #include <string.h>
 #include <signal.h>
 #include <errno.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 #include <sys/ptrace.h>
 #include "libproc_impl.h"
 
--- a/agent/src/os/linux/salibelf.c	Tue Feb 13 04:34:43 2018 +0000
+++ b/agent/src/os/linux/salibelf.c	Tue Feb 13 04:45:41 2018 +0000
@@ -25,6 +25,7 @@
 #include "salibelf.h"
 #include <stdlib.h>
 #include <unistd.h>
+#include <string.h>
 
 extern void print_debug(const char*,...);
 
--- a/agent/src/os/linux/symtab.c	Tue Feb 13 04:34:43 2018 +0000
+++ b/agent/src/os/linux/symtab.c	Tue Feb 13 04:45:41 2018 +0000
@@ -305,7 +305,7 @@
 
   unsigned char *bytes
     = (unsigned char*)(note+1) + note->n_namesz;
-  unsigned char *filename
+  char *filename
     = (build_id_to_debug_filename (note->n_descsz, bytes));
 
   fd = pathmap_open(filename);
--- a/src/cpu/x86/vm/assembler_x86.cpp	Tue Feb 13 04:34:43 2018 +0000
+++ b/src/cpu/x86/vm/assembler_x86.cpp	Tue Feb 13 04:45:41 2018 +0000
@@ -4713,7 +4713,7 @@
 }
 
 void Assembler::adcq(Register dst, Register src) {
-  (int) prefixq_and_encode(dst->encoding(), src->encoding());
+  (void) prefixq_and_encode(dst->encoding(), src->encoding());
   emit_arith(0x13, 0xC0, dst, src);
 }
 
@@ -4768,7 +4768,7 @@
 }
 
 void Assembler::andq(Register dst, Register src) {
-  (int) prefixq_and_encode(dst->encoding(), src->encoding());
+  (void) prefixq_and_encode(dst->encoding(), src->encoding());
   emit_arith(0x23, 0xC0, dst, src);
 }