Fix some gcc warnings on Solaris:
[paraslash.git] / daemon.c
index 931124e..5d4cf69 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -62,7 +62,7 @@ FILE *open_log(const char *logfile_name)
                return NULL;
        if (!(logfile = fopen(logfile_name, "a"))) {
                PARA_EMERG_LOG("can not open %s, uid: %d\n", logfile_name,
-                       getuid());
+                       (int)getuid());
                exit(EXIT_FAILURE);
        }
        setlinebuf(logfile);
@@ -123,7 +123,7 @@ void para_drop_privileges(const char *username, const char *groupname)
                }
                if (setgid(g->gr_gid) < 0) {
                        PARA_EMERG_LOG("failed to set group id %d (%s)\n",
-                               g->gr_gid, strerror(errno));
+                               (int)g->gr_gid, strerror(errno));
                        exit(EXIT_FAILURE);
                }
        }
@@ -140,7 +140,7 @@ void para_drop_privileges(const char *username, const char *groupname)
        }
        PARA_INFO_LOG("%s", "dropping root privileges\n");
        setuid(p->pw_uid);
-       PARA_DEBUG_LOG("uid: %d, euid: %d\n", getuid(), geteuid());
+       PARA_DEBUG_LOG("uid: %d, euid: %d\n", (int)getuid(), (int)geteuid());
 }
 
 /**