From: Christian Grothoff Date: Wed, 28 Apr 2010 13:43:19 +0000 (+0000) Subject: fixing warnings on OS X X-Git-Tag: initial-import-from-subversion-38251~21977 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2213e374c96c97d9682073e2c3e6ed5a6700d554;p=oweals%2Fgnunet.git fixing warnings on OS X --- diff --git a/src/util/os_priority.c b/src/util/os_priority.c index 3b04555d1..77b262703 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c @@ -62,8 +62,6 @@ GNUNET_OS_set_process_priority (pid_t proc, enum GNUNET_SCHEDULER_Priority prio) { int rprio = 0; - int have; - int delta; GNUNET_assert (prio < GNUNET_SCHEDULER_PRIORITY_COUNT); if (prio == GNUNET_SCHEDULER_PRIORITY_KEEP) @@ -118,12 +116,12 @@ GNUNET_OS_set_process_priority (pid_t proc, /* Set process priority */ #ifdef MINGW SetPriorityClass (GetCurrentProcess (), rprio); -#elif LINUX +#elif LINUX if ( (0 == proc) || (proc == getpid () ) ) { - have = nice (0); - delta = rprio - have; + int have = nice (0); + int delta = rprio - have; errno = 0; if ( (delta != 0) && (rprio == nice (delta)) && diff --git a/src/util/strings.c b/src/util/strings.c index 2cdcd3cee..6a7b9150b 100644 --- a/src/util/strings.c +++ b/src/util/strings.c @@ -199,7 +199,7 @@ GNUNET_STRINGS_to_utf8 (const char *input, size_t len, const char *charset) itmp = tmp; finSize = tmpSize; if (iconv (cd, -#if FREEBSD +#if FREEBSD || DARWIN (const char **) &input, #else (char **) &input,