fixing warnings on OS X
authorChristian Grothoff <christian@grothoff.org>
Wed, 28 Apr 2010 13:43:19 +0000 (13:43 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 28 Apr 2010 13:43:19 +0000 (13:43 +0000)
src/util/os_priority.c
src/util/strings.c

index 3b04555d1ccbcaa391b989e33ec131c988bdcc4e..77b2627035f06426cb559842445084865d2fe52b 100644 (file)
@@ -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)) && 
index 2cdcd3ceeedd03d27859ff6652db267f554b7827..6a7b9150be8415f82f22a1c90ff1358629822a3f 100644 (file)
@@ -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,