public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: testsuite: avoid "conflicting types" gcc warning
Date: Fri,  3 Sep 2021 10:16:49 +0000 (GMT)	[thread overview]
Message-ID: <20210903101649.EDACE385842C@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d5cc66426b49068919cf3a3c44e186c38ae2fc19

commit d5cc66426b49068919cf3a3c44e186c38ae2fc19
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Fri Sep 3 12:13:51 2021 +0200

    Cygwin: testsuite: avoid "conflicting types" gcc warning
    
    With gcc 11.2:
    
    test.h:50:5: warning: conflicting types for built-in function ‘execve’; expected ‘int(const char *, char * const*)’ [-Wbuiltin-declaration-mismatch]
    test.h:51:5: warning: conflicting types for built-in function ‘execv’; expected ‘int(const char *, char * const*)’ [-Wbuiltin-declaration-mismatch]
    test.h:52:5: warning: conflicting types for built-in function ‘execvp’; expected ‘int(const char *, char * const*)’ [-Wbuiltin-declaration-mismatch]
    
    Fix prototypes accordingly.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/testsuite/libltp/include/test.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/winsup/testsuite/libltp/include/test.h b/winsup/testsuite/libltp/include/test.h
index 8cffea4cb..757f3b8a1 100644
--- a/winsup/testsuite/libltp/include/test.h
+++ b/winsup/testsuite/libltp/include/test.h
@@ -47,9 +47,9 @@
 #undef execv
 #undef execve
 
-int execve(const char *, const char * const [], char * const *);
-int execv(const char *, const char * const []);
-int execvp(const char *, const char * const []);
+int execve(const char *, char * const [], char * const *);
+int execv(const char *, char * const []);
+int execvp(const char *, char * const []);
 
 /* CGF: Avoid compilation warnings for undefined functions */
 extern int setregid (gid_t, gid_t);


                 reply	other threads:[~2021-09-03 10:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210903101649.EDACE385842C@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).