Author: Matti Picus <matti.pi...@gmail.com>
Branch: 
Changeset: r92119:ad807f62258a
Date: 2017-08-10 23:35 +0300
http://bitbucket.org/pypy/pypy/changeset/ad807f62258a/

Log:    quiet a gcc warning by adding RPY_UNUSED __attribute__
        ((__unused__))

diff --git a/rpython/translator/c/src/precommondefs.h 
b/rpython/translator/c/src/precommondefs.h
--- a/rpython/translator/c/src/precommondefs.h
+++ b/rpython/translator/c/src/precommondefs.h
@@ -63,9 +63,11 @@
 #ifdef __GNUC__
 #  define RPY_EXPORTED extern __attribute__((visibility("default")))
 #  define _RPY_HIDDEN  __attribute__((visibility("hidden")))
+#  define RPY_UNUSED __attribute__ ((__unused__))
 #else
 #  define RPY_EXPORTED extern __declspec(dllexport)
 #  define _RPY_HIDDEN  /* nothing */
+#  define RPY_UNUSED   /*nothing */
 #endif
 #ifndef RPY_EXTERN
 #  define RPY_EXTERN   extern _RPY_HIDDEN
diff --git a/rpython/translator/c/src/signals.c 
b/rpython/translator/c/src/signals.c
--- a/rpython/translator/c/src/signals.c
+++ b/rpython/translator/c/src/signals.c
@@ -102,9 +102,10 @@
 static void write_str(int fd, const char *p)
 {
     int i = 0;
+    int res RPY_UNUSED;
     while (p[i] != '\x00')
         i++;
-    (void)write(fd, p, i);
+    res = write(fd, p, i);
 }
 
 static void signal_setflag_handler(int signum)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to