From patchwork Thu Dec 4 20:32:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 417909 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8D5D81400B7 for ; Fri, 5 Dec 2014 07:32:58 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; q= dns; s=default; b=WPjded8zNqIxWQkMCEyw+HIZDUm1MeWu0Yp6/WYJrKJHMs 10T4H+ZIZEC4f8O1uTlrRImZ/m4epe9xwBmT3zyTCAdby99DkG+uM+efFgkG/t2c BZ8VUe8cmNuUjSu+QBvc8z2xIJjt3EVi8IL6p4vRYZJRcl7onWy1yt1q48Igs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; s= default; bh=Lp/sDvbMYvQcYbAp6tDtonEjaQs=; b=V3QSWEgG3FChJ5/Qe7c1 GC9Kz0EEOrCmbhnGZxK6q4fJjNF/QJwfDNNw5HFCJMsOCuBJbpPyR9ga4fsYS+wQ cdAx20PKgvi1MfUJzO9mmeVJi2m8PQRzJFICvXlFVrGK9Ndm1A9z/ii4Wb91osS8 tHNGNsNtV45V0BaLz1Sdt9E= Received: (qmail 13957 invoked by alias); 4 Dec 2014 20:32:51 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 13941 invoked by uid 89); 4 Dec 2014 20:32:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: "GNU C. Library" Subject: [COMMITTED PATCH] De-warning a few stubs. Message-Id: <20141204203245.A7F062C3A08@topped-with-meat.com> Date: Thu, 4 Dec 2014 12:32:45 -0800 (PST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=-Zxk9US8LtI8LjufmVgA:9 a=CjuIK1q_8ugA:10 2014-12-04 Roland McGrath * io/openat64.c: #include (__openat64): Prototypify. Use ignore_value on MODE. * io/openat.c: Likewise. * misc/reboot.c: #include (reboot): Prototypify. Use ignore_value on HOWTO. * misc/ptrace.c: #include (ptrace): Prototypify. Use ignore_value for va_arg'd parameters. --- a/io/openat.c +++ b/io/openat.c @@ -22,6 +22,7 @@ #include #include #include +#include /* Some mostly-generic code (e.g. sysdeps/posix/getcwd.c) uses this variable if __ASSUME_ATFCTS is not defined. */ @@ -33,10 +34,7 @@ int __have_atfcts; the directory associated with FD. If OFLAG includes O_CREAT, a third argument is the file protection. */ int -__openat (fd, file, oflag) - int fd; - const char *file; - int oflag; +__openat (int fd, const char *file, int oflag, ...) { int mode; @@ -66,6 +64,8 @@ __openat (fd, file, oflag) va_start (arg, oflag); mode = va_arg (arg, int); va_end (arg); + + ignore_value (mode); } __set_errno (ENOSYS); --- a/io/openat64.c +++ b/io/openat64.c @@ -21,15 +21,13 @@ #include #include #include +#include /* Open FILE with access OFLAG. Interpret relative paths relative to the directory associated with FD. If OFLAG includes O_CREAT, a third argument is the file protection. */ int -__openat64 (fd, file, oflag) - int fd; - const char *file; - int oflag; +__openat64 (int fd, const char *file, int oflag, ...) { int mode; @@ -59,6 +57,8 @@ __openat64 (fd, file, oflag) va_start (arg, oflag); mode = va_arg (arg, int); va_end (arg); + + ignore_value (mode); } __set_errno (ENOSYS); --- a/misc/ptrace.c +++ b/misc/ptrace.c @@ -19,6 +19,7 @@ #include #include #include +#include /* Perform process tracing functions. REQUEST is one of the values in , 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) --- a/misc/reboot.c +++ b/misc/reboot.c @@ -18,15 +18,16 @@ #include #include #include +#include /* Reboot the system. */ int -reboot (howto) - int howto; +reboot (int howto) { + ignore_value (howto); + __set_errno (ENOSYS); return -1; } - stub_warning (reboot)