miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

very minor change to silence gcc compiler warnings

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> libnatpmp Compilation/Installation
View previous topic :: View next topic  
Author Message
Charles



Joined: 06 Nov 2007
Posts: 20

PostPosted: Wed Mar 11, 2009 1:01 pm    Post subject: very minor change to silence gcc compiler warnings Reply with quote

When building libnatpmp, I get three compiler warnings in natpmp.c saying there were no advance declarations of sendpendingrequest(), sendnatpmprequest(), and readnatpmpresponse(). Making these three functions static silences those warnings:

Code:

--- natpmp.c   2008-07-02 17:33:24.000000000 -0500
+++ /home/charles/Desktop/T/third-party/libnatpmp/natpmp.c   2009-03-11 07:57:39.000000000 -0500
@@ -79,7 +79,7 @@
    return 0;
 }
 
-int sendpendingrequest(natpmp_t * p)
+static int sendpendingrequest(natpmp_t * p)
 {
    int r;
 /*   struct sockaddr_in addr;*/
@@ -95,7 +95,7 @@
    return (r<0) ? NATPMP_ERR_SENDERR : r;
 }
 
-int sendnatpmprequest(natpmp_t * p)
+static int sendnatpmprequest(natpmp_t * p)
 {
    int n;
    if(!p)
@@ -160,7 +160,7 @@
    return sendnatpmprequest(p);
 }
 
-int readnatpmpresponse(natpmp_t * p, natpmpresp_t * response)
+static int readnatpmpresponse(natpmp_t * p, natpmpresp_t * response)
 {
    unsigned char buf[16];
    struct sockaddr_in addr;

[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> libnatpmp Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.