]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/extattrs.c
Fix all remaining warnings from gcc -Wall that can be fixed
[netatalk.git] / etc / afpd / extattrs.c
index 2890add282fc85684abd0cc7f3445006044ee941..126bf9cf98e1a5342ae1c8d9fb90c8bbcacd6e8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  $Id: extattrs.c,v 1.8 2009-10-20 09:53:42 franklahm Exp $
+  $Id: extattrs.c,v 1.10 2009-10-22 13:40:11 franklahm Exp $
   Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
 
   This program is free software; you can redistribute it and/or modify
@@ -45,6 +45,7 @@ static char *ea_resourcefork = "com.apple.ResourceFork";
 /* This should be big enough to consecutively store the names of all attributes */
 static char attrnamebuf[ATTRNAMEBUFSIZ];
 
+#ifdef DEBUG
 static void hexdump(void *m, size_t l) {
     char *p = m;
     int count = 0, len;
@@ -62,6 +63,7 @@ static void hexdump(void *m, size_t l) {
         }
     }
 }
+#endif
 
 /***************************************
  * AFP funcs
@@ -84,9 +86,11 @@ int afp_listextattr(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, siz
     struct adouble      ad, *adp = NULL;
     struct ofork        *of;
     char                *uname, *FinderInfo;
-    static int          buf_valid = 0, attrbuflen = 0;
     char                emptyFinderInfo[32] = { 0 };
 
+    static int          buf_valid = 0;
+    static size_t       attrbuflen = 0;
+
     *rbuflen = 0;
     ibuf += 2;