fix the new warnings I asked for

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This commit is contained in:
Kay Sievers
2005-10-27 20:32:07 +02:00
parent cf686d37b4
commit 916c5e4725
7 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -17,12 +17,12 @@ echo KERNEL_DIR: "$KERNEL_DIR"
# with debug
make clean EXTRAS="$EXTRAS" >/dev/null
make all -j4 $MAKEOPTS DEBUG=true EXTRAS="$EXTRAS" || exit
make all -j4 $MAKEOPTS DEBUG=true EXTRAS="$EXTRAS" || exit
echo -e "\n\n"
# without any logging
make clean EXTRAS="$EXTRAS" >/dev/null
make all $MAKEOPTS USE_LOG=false EXTRAS="$EXTRAS" || exit
make all $MAKEOPTS USE_LOG=false EXTRAS="$EXTRAS" || exit
echo -e "\n\n"
# klibc and debug
+2 -2
View File
@@ -437,7 +437,7 @@ static int add_to_rules(struct udev_rules *rules, char *line)
char owner[32];
uid_t uid = lookup_user(value);
dbg("replacing username='%s' by id=%i", value, uid);
sprintf(owner, "%li", uid);
sprintf(owner, "%u", (unsigned int) uid);
add_rule_key(rule, &rule->owner, operation, owner);
continue;
}
@@ -456,7 +456,7 @@ static int add_to_rules(struct udev_rules *rules, char *line)
char group[32];
gid_t gid = lookup_group(value);
dbg("replacing groupname='%s' by id=%i", value, gid);
sprintf(group, "%li", gid);
sprintf(group, "%u", (unsigned int) gid);
add_rule_key(rule, &rule->group, operation, group);
continue;
}
+3 -3
View File
@@ -39,14 +39,14 @@
/* global variables */
static int sock = -1;
static int log = 0;
static int udev_log = 0;
#ifdef USE_LOG
void log_message (int priority, const char *format, ...)
{
va_list args;
if (priority > log)
if (priority > udev_log)
return;
va_start(args, format);
@@ -69,7 +69,7 @@ int main(int argc, char *argv[], char *envp[])
env = getenv("UDEV_LOG");
if (env)
log = log_priority(env);
udev_log = log_priority(env);
logging_init("udevcontrol");
dbg("version %s", UDEV_VERSION);
+5 -5
View File
@@ -67,7 +67,7 @@ static int event_timeout;
static int max_childs;
static int max_childs_running;
static unsigned long long expected_seqnum;
static char log[32];
static char udev_log[32];
static LIST_HEAD(msg_list);
static LIST_HEAD(exec_list);
@@ -559,8 +559,8 @@ static struct uevent_msg *get_udevd_msg(void)
intval = (int *) usend_msg.envbuf;
info("udevd message (SET_LOG_PRIORITY) received, udev_log_priority=%i", *intval);
udev_log_priority = *intval;
sprintf(log, "UDEV_LOG=%i", udev_log_priority);
putenv(log);
sprintf(udev_log, "UDEV_LOG=%i", udev_log_priority);
putenv(udev_log);
break;
case UDEVD_SET_MAX_CHILDS:
intval = (int *) usend_msg.envbuf;
@@ -912,8 +912,8 @@ int main(int argc, char *argv[], char *envp[])
info("initialize max_childs_running to %u", max_childs_running);
/* export log_priority , as called programs may want to follow that setting */
sprintf(log, "UDEV_LOG=%i", udev_log_priority);
putenv(log);
sprintf(udev_log, "UDEV_LOG=%i", udev_log_priority);
putenv(udev_log);
while (!udev_exit) {
struct uevent_msg *msg;
+3 -3
View File
@@ -37,14 +37,14 @@
#define BUFSIZE 12345
#define FNSIZE 123
static int log = 0;
static int udev_log = 0;
#ifdef USE_LOG
void log_message (int priority, const char *format, ...)
{
va_list args;
if (priority > log)
if (priority > udev_log)
return;
va_start(args, format);
@@ -67,7 +67,7 @@ int main(int argc, char **argv, char **envp)
env = getenv("UDEV_LOG");
if (env)
log = log_priority(env);
udev_log = log_priority(env);
logging_init("udeveventrecorder");
dbg("version %s", UDEV_VERSION);
+3 -3
View File
@@ -42,14 +42,14 @@
#include "udev_utils.h"
#include "logging.h"
static int log = 0;
static int udev_log = 0;
#ifdef USE_LOG
void log_message (int priority, const char *format, ...)
{
va_list args;
if (priority > log)
if (priority > udev_log)
return;
va_start(args, format);
@@ -174,7 +174,7 @@ int main(int argc, char *argv[], char *envp[])
env = getenv("UDEV_LOG");
if (env)
log = log_priority(env);
udev_log = log_priority(env);
logging_init("udevinitsend");
dbg("version %s", UDEV_VERSION);
+2 -2
View File
@@ -181,7 +181,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "error receiving uevent message\n");
continue;
}
printf("UEVENT[%i] %s\n", time(NULL), buf);
printf("UEVENT[%llu] %s\n", (unsigned long long) time(NULL), buf);
}
if ((udev_monitor_sock > 0) && FD_ISSET(udev_monitor_sock, &readfds)) {
@@ -190,7 +190,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "error receiving udev message\n");
continue;
}
printf("UDEV [%i] %s\n", time(NULL), buf);
printf("UDEV [%llu] %s\n", (unsigned long long) time(NULL), buf);
}
if (buflen == 0)