From cea2c7ef5e01cf37755d340d20cbb85cef56a8bb Mon Sep 17 00:00:00 2001 From: didg Date: Sun, 8 Nov 2009 00:32:03 +0000 Subject: [PATCH 1/1] remove a gcc warning, signed/unsigned test --- libatalk/util/logger.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libatalk/util/logger.c b/libatalk/util/logger.c index 939d7f4d..956775e7 100644 --- a/libatalk/util/logger.c +++ b/libatalk/util/logger.c @@ -72,24 +72,24 @@ Netatalk 2001 (c) /* Main log config */ typedef struct { - int inited; /* file log config initialized ? */ - int filelogging; /* Any level set to filelogging ? */ - /* Deactivates syslog logging */ - char processname[16]; - int syslog_opened; /* syslog opened ? */ - int facility; /* syslog facility to use */ - int syslog_display_options; - int syslog_level; /* Log Level to send to syslog */ + int inited; /* file log config initialized ? */ + int filelogging; /* Any level set to filelogging ? */ + /* Deactivates syslog logging */ + char processname[16]; + int syslog_opened; /* syslog opened ? */ + int facility; /* syslog facility to use */ + int syslog_display_options; + enum loglevels syslog_level; /* Log Level to send to syslog */ } log_config_t; /* This stores the config and options for one filelog type (e.g. logger, afpd etc.) */ typedef struct { - int set; /* set individually ? yes: changing default + int set; /* set individually ? yes: changing default * doesnt change it. no: it changes it.*/ - char *filename; /* Name of file */ - int fd; /* logfiles fd */ - int level; /* Log Level to put in this file */ - int display_options; + char *filename; /* Name of file */ + int fd; /* logfiles fd */ + enum loglevels level; /* Log Level to put in this file */ + int display_options; } filelog_conf_t; /* ========================================================================= @@ -132,14 +132,14 @@ static int log_src_linenumber; /* Array to store text to list given a log type */ static const char *arr_logtype_strings[] = LOGTYPE_STRING_IDENTIFIERS; -static const int num_logtype_strings = COUNT_ARRAY(arr_logtype_strings); +static const unsigned int num_logtype_strings = COUNT_ARRAY(arr_logtype_strings); /* Array for charachters representing log severity in the log file */ static const char arr_loglevel_chars[] = {'-','S', 'E', 'W', 'N', 'I', 'D'}; -static const int num_loglevel_chars = COUNT_ARRAY(arr_loglevel_chars); +static const unsigned int num_loglevel_chars = COUNT_ARRAY(arr_loglevel_chars); static const char *arr_loglevel_strings[] = LOGLEVEL_STRING_IDENTIFIERS; -static const int num_loglevel_strings = COUNT_ARRAY(arr_loglevel_strings); +static const unsigned int num_loglevel_strings = COUNT_ARRAY(arr_loglevel_strings); /* ========================================================================= Internal function definitions @@ -158,7 +158,7 @@ static const int num_loglevel_strings = COUNT_ARRAY(arr_loglevel_strings); /* -[un]setuplog []*/ static void setuplog_internal(const char *loglevel, const char *logtype, const char *filename) { - int typenum, levelnum; + unsigned int typenum, levelnum; /* Parse logtype */ for( typenum=0; typenum < num_logtype_strings; typenum++) { -- 2.39.2