Charles
Joined: 06 Nov 2007 Posts: 20
|
Posted: Wed Mar 11, 2009 1:01 pm Post subject: very minor change to silence gcc compiler warnings |
|
|
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] |
|