INN commit: trunk (innd/perl.c nnrpd/perl.c)

INN Commit Russ_Allbery at isc.org
Sun Feb 22 21:02:17 UTC 2009


    Date: Sunday, February 22, 2009 @ 13:02:17
  Author: iulius
Revision: 8344

Add void casts to silence "value computed is not used" warnings
with gcc 4.3.2.

Modified:
  trunk/innd/perl.c
  trunk/nnrpd/perl.c

--------------+
 innd/perl.c  |   26 +++++++++++++-------------
 nnrpd/perl.c |   34 +++++++++++++++++-----------------
 2 files changed, 30 insertions(+), 30 deletions(-)

Modified: innd/perl.c
===================================================================
--- innd/perl.c	2009-02-22 18:50:53 UTC (rev 8343)
+++ innd/perl.c	2009-02-22 21:02:17 UTC (rev 8344)
@@ -80,7 +80,7 @@
     for (i = 0 ; i < MAX_ARTHEADER ; i++) {
 	if (HDR_FOUND(i)) {
 	    hp = &ARTheaders[i];
-            hv_store(hdr, (char *) hp->Name, hp->Size, newSVpv(HDR(i), 0), 0);
+            (void) hv_store(hdr, (char *) hp->Name, hp->Size, newSVpv(HDR(i), 0), 0);
 	}
     }
 
@@ -94,13 +94,13 @@
        compute a hash for artBody, we give it "42". */
     if (artBody) {
 #if (PERL_REVISION == 5) && ((PERL_VERSION < 7) || ((PERL_VERSION == 7) && (PERL_SUBVERSION < 1)))
-        hv_store(hdr, "__BODY__", 8, newSVpv(artBody, artLen), 0);
+        (void) hv_store(hdr, "__BODY__", 8, newSVpv(artBody, artLen), 0);
 #else
-        hv_store(hdr, "__BODY__", 8, newSVpvn_share(artBody, artLen, 42), 0);
+        (void) hv_store(hdr, "__BODY__", 8, newSVpvn_share(artBody, artLen, 42), 0);
 #endif /* Perl < 5.7.1 */
     }
 
-    hv_store(hdr, "__LINES__", 9, newSViv(lines), 0);
+    (void) hv_store(hdr, "__LINES__", 9, newSViv(lines), 0);
 
     ENTER;
     SAVETMPS;
@@ -196,24 +196,24 @@
     mode = perl_get_hv("mode", 1);
 
     if (Mode == OMrunning)
-        hv_store(mode, "Mode", 4, newSVpv("running", 7), 0);
+        (void) hv_store(mode, "Mode", 4, newSVpv("running", 7), 0);
     if (Mode == OMpaused)
-        hv_store(mode, "Mode", 4, newSVpv("paused", 6), 0);
+        (void) hv_store(mode, "Mode", 4, newSVpv("paused", 6), 0);
     if (Mode == OMthrottled)
-        hv_store(mode, "Mode", 4, newSVpv("throttled", 9), 0);
+        (void) hv_store(mode, "Mode", 4, newSVpv("throttled", 9), 0);
     if (Mode == OMshutdown)
-        hv_store(mode, "Mode", 4, newSVpv("shutdown", 8), 0);
+        (void) hv_store(mode, "Mode", 4, newSVpv("shutdown", 8), 0);
 
     if (NewMode == OMrunning)
-        hv_store(mode, "NewMode", 7, newSVpv("running", 7), 0);
+        (void) hv_store(mode, "NewMode", 7, newSVpv("running", 7), 0);
     if (NewMode == OMpaused)
-        hv_store(mode, "NewMode", 7, newSVpv("paused", 6), 0);
+        (void) hv_store(mode, "NewMode", 7, newSVpv("paused", 6), 0);
     if (NewMode == OMthrottled)
-        hv_store(mode, "NewMode", 7, newSVpv("throttled", 9), 0);
+        (void) hv_store(mode, "NewMode", 7, newSVpv("throttled", 9), 0);
     if (NewMode == OMshutdown)
-        hv_store(mode, "NewMode", 7, newSVpv("shutdown", 8), 0);
+        (void) hv_store(mode, "NewMode", 7, newSVpv("shutdown", 8), 0);
 
-    hv_store(mode, "reason", 6, newSVpv(reason, 0), 0);
+    (void) hv_store(mode, "reason", 6, newSVpv(reason, 0), 0);
 
     PUSHMARK(SP);
     perl_call_sv((SV *) filter, G_EVAL|G_DISCARD|G_NOARGS);

Modified: nnrpd/perl.c
===================================================================
--- nnrpd/perl.c	2009-02-22 18:50:53 UTC (rev 8343)
+++ nnrpd/perl.c	2009-02-22 21:02:17 UTC (rev 8344)
@@ -86,7 +86,7 @@
     hdr = perl_get_hv("hdr", true);
     for (hp = Table; hp < EndOfTable; hp++) {
         if (hp->Body)
-            hv_store(hdr, (char *) hp->Name, strlen(hp->Name),
+            (void) hv_store(hdr, (char *) hp->Name, strlen(hp->Name),
                      newSVpv(hp->Body, 0), 0);
     }
    
@@ -105,7 +105,7 @@
         }
         s++;
         t = (*s == ' ' ? s + 1 : s);
-        hv_store(hdr, p, (s - p) - 1, newSVpv(t, 0), 0);
+        (void) hv_store(hdr, p, (s - p) - 1, newSVpv(t, 0), 0);
     }
     /* Store user. */
     sv_setpv(perl_get_sv("user", true), PERMuser);
@@ -226,13 +226,13 @@
     SAVETMPS;
 
     attribs = perl_get_hv("attributes", true);
-    hv_store(attribs, "hostname", 8, newSVpv(Client.host, 0), 0);
-    hv_store(attribs, "ipaddress", 9, newSVpv(Client.ip, 0), 0);
-    hv_store(attribs, "port", 4, newSViv(Client.port), 0);
-    hv_store(attribs, "interface", 9, newSVpv(Client.serverhost, 0), 0);
-    hv_store(attribs, "intipaddr", 9, newSVpv(Client.serverip, 0), 0);
-    hv_store(attribs, "intport", 7, newSViv(Client.serverport), 0);
-    hv_store(attribs, "username", 8, newSVpv(user, 0), 0);
+    (void) hv_store(attribs, "hostname", 8, newSVpv(Client.host, 0), 0);
+    (void) hv_store(attribs, "ipaddress", 9, newSVpv(Client.ip, 0), 0);
+    (void) hv_store(attribs, "port", 4, newSViv(Client.port), 0);
+    (void) hv_store(attribs, "interface", 9, newSVpv(Client.serverhost, 0), 0);
+    (void) hv_store(attribs, "intipaddr", 9, newSVpv(Client.serverip, 0), 0);
+    (void) hv_store(attribs, "intport", 7, newSViv(Client.serverport), 0);
+    (void) hv_store(attribs, "username", 8, newSVpv(user, 0), 0);
 
     PUSHMARK(SP);
 
@@ -346,14 +346,14 @@
     ENTER;
     SAVETMPS;
     attribs = perl_get_hv("attributes", true);
-    hv_store(attribs, "hostname", 8, newSVpv(Client.host, 0), 0);
-    hv_store(attribs, "ipaddress", 9, newSVpv(Client.ip, 0), 0);
-    hv_store(attribs, "port", 4, newSViv(Client.port), 0);
-    hv_store(attribs, "interface", 9, newSVpv(Client.serverhost, 0), 0);
-    hv_store(attribs, "intipaddr", 9, newSVpv(Client.serverip, 0), 0);
-    hv_store(attribs, "intport", 7, newSViv(Client.serverport), 0);
-    hv_store(attribs, "username", 8, newSVpv(user, 0), 0);
-    hv_store(attribs, "password", 8, newSVpv(passwd, 0), 0);
+    (void) hv_store(attribs, "hostname", 8, newSVpv(Client.host, 0), 0);
+    (void) hv_store(attribs, "ipaddress", 9, newSVpv(Client.ip, 0), 0);
+    (void) hv_store(attribs, "port", 4, newSViv(Client.port), 0);
+    (void) hv_store(attribs, "interface", 9, newSVpv(Client.serverhost, 0), 0);
+    (void) hv_store(attribs, "intipaddr", 9, newSVpv(Client.serverip, 0), 0);
+    (void) hv_store(attribs, "intport", 7, newSViv(Client.serverport), 0);
+    (void) hv_store(attribs, "username", 8, newSVpv(user, 0), 0);
+    (void) hv_store(attribs, "password", 8, newSVpv(passwd, 0), 0);
     
     PUSHMARK(SP);
     rc = perl_call_pv("authenticate", G_EVAL|G_ARRAY);




More information about the inn-committers mailing list