]> arthur.barton.de Git - netatalk.git/commitdiff
remove trivial warnings
authordidg <didg>
Tue, 21 Jul 2009 13:41:16 +0000 (13:41 +0000)
committerdidg <didg>
Tue, 21 Jul 2009 13:41:16 +0000 (13:41 +0000)
etc/afpd/afp_dsi.c
etc/afpd/afp_options.c
etc/afpd/fork.c
etc/cnid_dbd/cnid_metad.c
include/atalk/adouble.h
libatalk/adouble/ad_attr.c
libatalk/adouble/ad_flush.c
libatalk/adouble/ad_open.c
libatalk/cnid/dbd/cnid_dbd.c

index 6765e81cc9ef095ef9dc0ec5bf2bdb5824aaabeb..b9f45706c5a4e6a33c35d9396abc6a2cef177022 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.36 2009-04-16 06:17:14 franklahm Exp $
+ * $Id: afp_dsi.c,v 1.37 2009-07-21 13:41:16 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -217,7 +217,7 @@ void afp_over_dsi(AFPObj *obj)
     u_int32_t err, cmd;
     u_int8_t function;
     struct sigaction action;
-    char *afpcmpstr;
+    const char *afpcmpstr;
 
     obj->exit = afp_dsi_die;
     obj->reply = (int (*)()) dsi_cmdreply;
index f173d0169309e6e7c7529578c74d6c52b22a0051..2a73678566e8683fc7434ed671ca6b5cc8f86354 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_options.c,v 1.43 2009-04-30 10:48:38 franklahm Exp $
+ * $Id: afp_options.c,v 1.44 2009-07-21 13:41:16 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -319,15 +319,16 @@ int afp_options_parseline(char *buf, struct afp_options *options)
     }
 
     /* -[no]setuplog <logtype> <loglevel> [<filename>]*/
-    char *optstr;
     c = buf;
     /* Now THIS is hokey! Multiple occurrences are not supported by our current code, */
     /* so I have to loop myself. */
-    while (NULL != (c = strstr(c, "-setuplog")))
+    while (NULL != (c = strstr(c, "-setuplog"))) {
+        char *optstr;
         if ((optstr = getoption(c, "-setuplog"))) {
             setuplog(optstr);
             c += sizeof("-setuplog");
         }
+    }
 
     if ((c = getoption(buf, "-unsetuplog")))
       unsetuplog(c);
index 27813b1ee400a9e0efc224fb2f0e4e4904624333..777f9a609ba74ee9b24382ba50ec08ac5937e9b9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: fork.c,v 1.60 2009-02-25 22:46:11 didg Exp $
+ * $Id: fork.c,v 1.61 2009-07-21 13:41:16 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -1105,7 +1105,7 @@ int       ibuflen _U_, *rbuflen;
   see: http://mirror.linux.org.au/pub/linux.conf.au/2007/video/talks/278.pdf.
  */
 int afp_syncfork(obj, ibuf, ibuflen, rbuf, rbuflen )
-    AFPObj  *obj;
+    AFPObj  *obj _U_;
     char    *ibuf, *rbuf _U_;
     int     ibuflen _U_, *rbuflen;
 {
index 3aaf4f150b5a082ece792377e5575c19f9cc891e..d0207cb8d64d77b38341a70112c24db34a3e8aca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_metad.c,v 1.12 2009-06-09 11:58:49 franklahm Exp $
+ * $Id: cnid_metad.c,v 1.13 2009-07-21 13:41:16 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -387,7 +387,7 @@ gid_t group_to_gid ( group )
 }
 
 /* ------------------ */
-void catch_alarm(int sig) {
+void catch_alarm(int sig _U_) {
     alarmed = 1;
 }
 
index 3f2de2002df6cd487192950521c2b423acb29d08..1e3680a21fb2aeabde7aef8da6320bb97a87f75b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: adouble.h,v 1.38 2009-07-20 23:23:02 didg Exp $
+ * $Id: adouble.h,v 1.39 2009-07-21 13:41:16 didg Exp $
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *
@@ -442,6 +442,7 @@ struct adouble_fops {
 */
 extern int ad_rebuild_adouble_header __P((struct adouble *));
 extern int ad_rebuild_sfm_header __P((struct adouble *));
+extern int ad_copy_header __P((struct adouble *, struct adouble *));
 
 extern int ad_flush           __P((struct adouble *));
 extern int ad_close           __P((struct adouble *, int));
index 3cd55c5d92015169b0fa9f7f1e26ad105a14ed11..a5727d52d40a31a2d48939057e95ceed983b0cfc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_attr.c,v 1.9 2009-06-19 13:38:34 franklahm Exp $
+ * $Id: ad_attr.c,v 1.10 2009-07-21 13:41:16 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -20,8 +20,8 @@
  */
 int ad_getattr(const struct adouble *ad, u_int16_t *attr)
 {
-    *attr = 0;
     u_int16_t fflags;
+    *attr = 0;
 
     if (ad->ad_version == AD_VERSION1) {
         if (ad_getentryoff(ad, ADEID_FILEI)) {
index e942607c5646fdcba22c316bc2279c4d5af39fa9..341df2e617837f0d8ff34e618ad2f1b745b49532 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_flush.c,v 1.9 2007-04-11 01:11:10 didg Exp $
+ * $Id: ad_flush.c,v 1.10 2009-07-21 13:41:16 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -109,7 +109,7 @@ int  ad_rebuild_adouble_header(struct adouble *ad)
 int ad_copy_header(struct adouble *add, struct adouble *ads)
 {
     u_int32_t          eid;
-    int                        len;
+    u_int32_t          len;
 
     for ( eid = 0; eid < ADEID_MAX; eid++ ) {
       if ( ads->ad_eid[ eid ].ade_off == 0 ) {
index d7251d25702d304cb801b696c25e4f95fa2b597c..d5d4e274b33f42dc6d7d780707c5627495ad3a50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_open.c,v 1.44 2009-07-20 23:23:02 didg Exp $
+ * $Id: ad_open.c,v 1.45 2009-07-21 13:41:16 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -1136,7 +1136,7 @@ static int new_rfork(const char *path, struct adouble *ad, int adflags);
 #endif
 
 /* --------------------------- */
-static int ad_check_size(struct adouble *ad, struct stat *st)
+static int ad_check_size(struct adouble *ad _U_, struct stat *st)
 {
    if (st->st_size > 0 && st->st_size < AD_DATASZ1) 
        return 1;
@@ -1144,7 +1144,7 @@ static int ad_check_size(struct adouble *ad, struct stat *st)
 }
 
 /* --------------------------- */
-static int ad_check_size_sfm(struct adouble *ad, struct stat *st)
+static int ad_check_size_sfm(struct adouble *ad _U_, struct stat *st)
 {
    if (st->st_size > 0 && st->st_size < AD_SFM_LEN) 
        return 1;
@@ -1164,7 +1164,7 @@ static int ad_header_upgrade(struct adouble *ad, char *name)
 }
 
 /* --------------------------- */
-static int ad_header_upgrade_none(struct adouble *ad, char *name)
+static int ad_header_upgrade_none(struct adouble *ad _U_, char *name _U_)
 {
     return 0;
 }
index b7c47e7954888172653c76a7a9b81fdee90b42d5..ce1c0e243b1b9aa49b2da089af43097ecbbab66a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_dbd.c,v 1.8 2009-05-28 10:22:07 franklahm Exp $
+ * $Id: cnid_dbd.c,v 1.9 2009-07-21 13:41:16 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -328,11 +328,11 @@ static int transmit(CNID_private *db, struct cnid_dbd_rqst *rqst, struct cnid_db
     time(&orig);
     while (1) {
         if (db->fd == -1) {
-            LOG(log_debug, logtype_cnid, "transmit: connecting to cnid_dbd ...");
             struct cnid_dbd_rqst rqst_stamp;
             struct cnid_dbd_rply rply_stamp;
             char  stamp[ADEDLEN_PRIVSYN];
 
+            LOG(log_debug, logtype_cnid, "transmit: connecting to cnid_dbd ...");
             if ((db->fd = init_tsock(db)) < 0) {
                 time(&t);
                 if (t - orig > MAX_DELAY)