]> arthur.barton.de Git - netatalk.git/commitdiff
Warning fixes.
authorsrittau <srittau>
Fri, 6 Jun 2003 21:17:19 +0000 (21:17 +0000)
committersrittau <srittau>
Fri, 6 Jun 2003 21:17:19 +0000 (21:17 +0000)
bin/megatron/hqx.c
bin/megatron/nad.h
etc/afpd/unix.c
libatalk/cnid/cnid_add.c
libatalk/cnid/cnid_close.c
libatalk/cnid/cnid_lookup.c
libatalk/cnid/cnid_mangle_add.c
libatalk/cnid/cnid_mangle_get.c
libatalk/cnid/cnid_private.h
libatalk/cnid/cnid_update.c
libatalk/util/logger.c

index 40187bc243f858029c9c1b35eaff93278ec1aa4b..819f5ca727b5ff27e8898c95789b343abd533c2b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: hqx.c,v 1.12 2002-04-29 01:52:49 morgana Exp $
+ * $Id: hqx.c,v 1.13 2003-06-06 21:17:19 srittau Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -28,6 +28,7 @@
 #include <netatalk/endian.h>
 
 #include "megatron.h"
+#include "nad.h"
 #include "hqx.h"
 
 #define HEXOUTPUT      0
index 0e0332dfc99cf771bfe9c5e84cce8db50347cd45..9ce6aaf9ee4d64478c9378705724bc43b85136e0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nad.h,v 1.2 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: nad.h,v 1.3 2003-06-06 21:17:20 srittau Exp $
  */
 
 #ifndef _NAD_H
@@ -15,4 +15,6 @@ int nad_read(int fork, char *forkbuf, int bufc);
 int nad_write(int fork, char *forkbuf, int bufc);
 int nad_close(int status);
 
+void select_charset(int options);
+
 #endif /* _NAD_H */
index 2d4c4518b3ddeae5bc16f957533b77b59d5fd074..22019e563a77fe2144c52cf153ec7ecc5b79a68a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: unix.c,v 1.44 2003-06-05 09:17:12 didg Exp $
+ * $Id: unix.c,v 1.45 2003-06-06 21:18:00 srittau Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -23,7 +23,7 @@
 #include <atalk/adouble.h>
 #include <atalk/afp.h>
 /* STDC check */
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
 #include <string.h>
 #else /* STDC_HEADERS */
 #ifndef HAVE_STRCHR
@@ -710,10 +710,12 @@ recursive_chown_end:
 /* This is equivalent of unix rename(). */
 int unix_rename(const char *oldpath, const char *newpath)
 {
+#if 0
        char pd_name[PATH_MAX+1];
        int i;
         struct stat pd_stat;
         uid_t uid;
+#endif
 
        if (rename(oldpath, newpath) < 0)
                return -1;
index f044f9501c15effabe1d93d4b9a10f584f59d85e..3fd59e8c6a7d5505155e1ee5aa56cf5dcfe6c9af 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_add.c,v 1.34 2003-03-07 14:51:50 didg Exp $
+ * $Id: cnid_add.c,v 1.35 2003-06-06 21:22:43 srittau Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -37,6 +37,7 @@
 #include <atalk/cnid.h>
 #include <atalk/util.h>
 
+#define use_make_cnid_data
 #include "cnid_private.h"
 
 #ifdef CNID_DB_CDB
@@ -50,7 +51,7 @@ static int add_cnid(CNID_private *db, DBT *key, DBT *data) {
 #ifndef CNID_DB_CDB
     DB_TXN *tid;
 #endif /* CNID_DB_CDB */
-    int rc, ret;
+    int rc;
 
     memset(&altkey, 0, sizeof(altkey));
     memset(&altdata, 0, sizeof(altdata));
index 39e07a48c0b37b01d3b9b484874a925bd0c4939e..db5647eb705dbfd9972485c66db731bc5c3801c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_close.c,v 1.29 2003-03-09 19:55:35 didg Exp $
+ * $Id: cnid_close.c,v 1.30 2003-06-06 21:22:44 srittau Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -24,7 +24,6 @@
 
 void cnid_close(void *CNID) {
     CNID_private *db;
-    int rc;
 
     if (!(db = CNID)) {
         return;
index 139788603633f07c67e5a01eef46f1f1e22c7e58..153dcca735da404828b86cd3df8114c6229399ee 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_lookup.c,v 1.16 2003-01-04 20:49:33 jmarcus Exp $
+ * $Id: cnid_lookup.c,v 1.17 2003-06-06 21:22:44 srittau Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -19,6 +19,7 @@
 #include <atalk/adouble.h>
 #include <atalk/cnid.h>
 
+#define use_make_cnid_data
 #include "cnid_private.h"
 
 #define LOGFILEMAX    100  /* kbytes */
index ef37a315446eaabde3991bd0ece113d7bc7f9c44..6439eb44a8720477c3efec404ca7cdd20cbd9bdf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_mangle_add.c,v 1.5 2003-01-04 20:49:33 jmarcus Exp $
+ * $Id: cnid_mangle_add.c,v 1.6 2003-06-06 21:22:44 srittau Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -35,8 +35,7 @@ cnid_mangle_add(void *CNID, char *mfilename, char *filename)
 #ifndef CNID_DB_CDB
     DB_TXN *tid;
 #endif /* CNID_DB_CDB */
-    cnid_t id;
-    int rc, ret;
+    int rc;
 
     if (!(db = CNID)) {
         return -1;
index b0c3d289de68b6bbab2b44f32d2b435d1b5ccf6c..dec6c29d4a87170ffcf3761d7e1c70c56029146f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_mangle_get.c,v 1.7 2003-01-04 20:49:33 jmarcus Exp $
+ * $Id: cnid_mangle_get.c,v 1.8 2003-06-06 21:22:45 srittau Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -28,8 +28,6 @@ cnid_mangle_get(void *CNID, char *mfilename)
 {
     CNID_private *db;
     DBT key, data;
-    cnid_t id;
-    struct stat st;
     char *filename;
     int rc;
 
index 5b6ff05afc2ea1d92a9dc4cf06dbe7080a74ab95..d5ee6a47e03794d727b63f3ec98bea6fed51ef35 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_private.h,v 1.11 2002-05-30 06:41:19 jmarcus Exp $
+ * $Id: cnid_private.h,v 1.12 2003-06-06 21:22:45 srittau Exp $
  */
 
 #ifndef LIBATALK_CNID_PRIVATE_H
@@ -113,6 +113,7 @@ typedef struct CNID_private {
 #define __inline__
 #endif /* __inline__ */
 
+#ifdef use_make_cnid_data
 /* construct db_cnid data. NOTE: this is not re-entrant.  */
 static __inline__ char *make_cnid_data(const struct stat *st,
                                        const cnid_t did,
@@ -137,5 +138,6 @@ static __inline__ char *make_cnid_data(const struct stat *st,
 
     return start;
 }
+#endif /* use_make_cnid_date */
 
 #endif /* atalk/cnid/cnid_private.h */
index 1a2dbb1c5d6f8f808d92f58784bbf94040ebe99f..92aafee40266a4175b9f4fa10f1b3d4a4601d65f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_update.c,v 1.20 2002-08-30 03:12:52 jmarcus Exp $
+ * $Id: cnid_update.c,v 1.21 2003-06-06 21:22:45 srittau Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -19,6 +19,7 @@
 #include <atalk/adouble.h>
 #include <atalk/cnid.h>
 
+#define use_make_cnid_data
 #include "cnid_private.h"
 
 #ifdef CNID_DB_CDB
index 4dc47afae05dc0ccc8825e2052ea973c1491411f..3a7b88ab4ab9d5a3803acb0d9043223748abf4a8 100644 (file)
@@ -134,8 +134,6 @@ void generate_message_details(char *message_details_buffer,
 
 int get_syslog_equivalent(enum loglevels loglevel);
 
-static char *get_command_name(char *commandpath);
-
 /* =========================================================================
     Instanciated data
    ========================================================================= */
@@ -235,12 +233,6 @@ bool log_setup(char *filename, enum loglevels loglevel, enum logtypes logtype,
 {
 #ifndef DISABLE_LOGGER
 
-  struct stat statbuf;
-  int firstattempt;
-  int retval;
-  gid_t gid;
-  uid_t uid;
-  int access;
   char lastchar[2];
 
   log_file_data_pair *logs;
@@ -668,6 +660,7 @@ void load_proccessname_from_proc()
     Internal function definitions
    ========================================================================= */
 
+#if 0
 static char *get_command_name(char *commandpath)
 {
   char *ptr;
@@ -679,12 +672,13 @@ static char *get_command_name(char *commandpath)
     ptr = commandpath;
   else
     ptr++;
-
+                                                                                
 #ifdef DEBUG_OUTPUT_TO_SCREEN
   printf("Concluded %s\n", ptr);
 #endif
   return ptr;
 }
+#endif
 
 void  workout_what_to_print(struct what_to_print_array *what_to_print, 
                            struct tag_log_file_data *log_struct)
@@ -720,18 +714,10 @@ void generate_message_details(char *message_details_buffer,
                               struct tag_log_file_data *log_struct,
                               enum loglevels loglevel, enum logtypes logtype)
 {
-  char datebuffer[32];
-  char processinfo[64];
-
   char *ptr = message_details_buffer;
   int   templen;
   int   len = message_details_buffer_length;
 
-  char log_buffer[MAXLOGSIZE];
-  const char *logtype_string;
-
-  char loglevel_string[12]; /* max int size is 2 billion, or 10 digits */
-
   struct what_to_print_array what_to_print;
 
   workout_what_to_print(&what_to_print, log_struct);
@@ -929,8 +915,7 @@ void setuplog(char *logtype, char *loglevel, char *filename)
     can be taken from default if needs be.  
    */
   /* const char* sources[] = {"syslog", "filelog"}; */
-  const char *null = "";
-  int sourcenum, typenum, levelnum;
+  int typenum, levelnum;
   log_file_data_pair *logs = log_file_arr[logtype_default];
 
   /*