dotnfc / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
1 stars 0 forks source link

warning: no previous prototype for ... #193

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Making all in drivers
acr122_pcsc.c:110: warning: no previous prototype for 
‘acr122_pcsc_get_scardcontext’
acr122_pcsc.c:122: warning: no previous prototype for 
‘acr122_pcsc_free_scardcontext’
acr122_pcsc.c:202: warning: no previous prototype for 
‘acr122_pcsc_connstring_decode’

Declare static functions as static.

Proposed patch:
Index: libnfc/drivers/acr122_pcsc.c
===================================================================
--- libnfc/drivers/acr122_pcsc.c    (revision 1337)
+++ libnfc/drivers/acr122_pcsc.c    (working copy)
@@ -101,7 +105,7 @@ struct acr122_pcsc_data {
 static SCARDCONTEXT _SCardContext;
 static int _iSCardContextRefCount = 0;

-SCARDCONTEXT *
+static SCARDCONTEXT *
 acr122_pcsc_get_scardcontext (void)
 {
   if (_iSCardContextRefCount == 0) {
@@ -113,7 +117,7 @@ acr122_pcsc_get_scardcontext (void)
   return &_SCardContext;
 }

-void
+static void
 acr122_pcsc_free_scardcontext (void)
 {
   if (_iSCardContextRefCount) {
@@ -193,7 +197,7 @@ struct acr122_pcsc_descriptor {
   int bus_index;
 };

-int
+static int
 acr122_pcsc_connstring_decode (const nfc_connstring connstring, struct acr122_pcsc_descriptor *desc)
 {
   char *cs = malloc (strlen (connstring) + 1);

Original issue reported on code.google.com by ludovic....@gmail.com on 12 May 2012 at 8:33

GoogleCodeExporter commented 9 years ago
Fixed in revision r1338

Original comment by ludovic....@gmail.com on 13 May 2012 at 12:26