about summary refs log tree commit diff
path: root/misc/ptrace.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-12-04 12:31:38 -0800
committerRoland McGrath <roland@hack.frob.com>2014-12-04 12:31:38 -0800
commit4bee4cd9593610ac1204529076591871b1143c7e (patch)
treec93f3b074902e65d663da97e34307ae873feadaf /misc/ptrace.c
parent84dbedb6081f655bdfc4bf93a6e0e7f46234a8a7 (diff)
downloadglibc-4bee4cd9593610ac1204529076591871b1143c7e.tar.gz
glibc-4bee4cd9593610ac1204529076591871b1143c7e.tar.xz
glibc-4bee4cd9593610ac1204529076591871b1143c7e.zip
De-warning a few stubs.
Diffstat (limited to 'misc/ptrace.c')
-rw-r--r--misc/ptrace.c44
1 files changed, 26 insertions, 18 deletions
diff --git a/misc/ptrace.c b/misc/ptrace.c
index f999e73b4f..b6db0153d2 100644
--- a/misc/ptrace.c
+++ b/misc/ptrace.c
@@ -19,6 +19,7 @@
 #include <sys/ptrace.h>
 #include <sys/types.h>
 #include <stdarg.h>
+#include <libc-internal.h>
 
 /* Perform process tracing functions.  REQUEST is one of the values
    in <sys/ptrace.h>, and determines the action to be taken.
@@ -30,8 +31,7 @@
      pid_t PID, void *ADDR, int DATA, void *ADDR2
    after PID.  */
 int
-ptrace (request)
-     enum __ptrace_request request;
+ptrace (enum __ptrace_request request, ...)
 {
   pid_t pid;
   void *addr;
@@ -60,32 +60,41 @@ ptrace (request)
     case PTRACE_SETFPREGS:
     case PTRACE_GETFPAREGS:
     case PTRACE_SETFPAREGS:
-      va_start(ap, request);
-      pid = va_arg(ap, pid_t);
-      addr = va_arg(ap, void *);
-      va_end(ap);
+      va_start (ap, request);
+      pid = va_arg (ap, pid_t);
+      addr = va_arg (ap, void *);
+      va_end (ap);
+      ignore_value (pid);
+      ignore_value (addr);
       break;
 
     case PTRACE_POKETEXT:
     case PTRACE_POKEDATA:
     case PTRACE_POKEUSER:
-      va_start(ap, request);
-      pid = va_arg(ap, pid_t);
-      addr = va_arg(ap, void *);
-      data = va_arg(ap, int);
-      va_end(ap);
+      va_start (ap, request);
+      pid = va_arg (ap, pid_t);
+      addr = va_arg (ap, void *);
+      data = va_arg (ap, int);
+      va_end (ap);
+      ignore_value (pid);
+      ignore_value (addr);
+      ignore_value (data);
       break;
 
     case PTRACE_READDATA:
     case PTRACE_WRITEDATA:
     case PTRACE_READTEXT:
     case PTRACE_WRITETEXT:
-      va_start(ap, request);
-      pid = va_arg(ap, pid_t);
-      addr = va_arg(ap, void *);
-      data = va_arg(ap, int);
-      addr2 = va_arg(ap, void *);
-      va_end(ap);
+      va_start (ap, request);
+      pid = va_arg (ap, pid_t);
+      addr = va_arg (ap, void *);
+      data = va_arg (ap, int);
+      addr2 = va_arg (ap, void *);
+      va_end (ap);
+      ignore_value (pid);
+      ignore_value (addr);
+      ignore_value (data);
+      ignore_value (addr2);
       break;
 
     default:
@@ -97,5 +106,4 @@ ptrace (request)
   return -1;
 }
 
-
 stub_warning (ptrace)