]> granicus.if.org Git - imagemagick/commitdiff
Fixed compiler warnings.
authordirk <dirk@git.imagemagick.org>
Fri, 9 May 2014 18:45:41 +0000 (18:45 +0000)
committerdirk <dirk@git.imagemagick.org>
Fri, 9 May 2014 18:45:41 +0000 (18:45 +0000)
coders/pdf.c
coders/ps.c
coders/vips.c

index cdce09d342c5b7d025df79aca278a0db93bcab95..54033d3e15badd1fb1ad7cc2d9e2b0e4541e3488 100644 (file)
@@ -125,6 +125,7 @@ static MagickBooleanType
 %    o exception: return any errors or warnings in this structure.
 %
 */
+#if defined(MAGICKCORE_GS_DELEGATE) || defined(MAGICKCORE_WINDOWS_SUPPORT)
 static int MagickDLLCall PDFDelegateMessage(void *handle,const char *msg,
   int len)
 {
@@ -147,10 +148,15 @@ static int MagickDLLCall PDFDelegateMessage(void *handle,const char *msg,
   (*messages)[offset+len] ='\0';
   return(len);
 }
+#endif
 
 static MagickBooleanType InvokePDFDelegate(const MagickBooleanType verbose,
   const char *command,ExceptionInfo *exception)
 {
+  int
+    status;
+
+#if defined(MAGICKCORE_GS_DELEGATE) || defined(MAGICKCORE_WINDOWS_SUPPORT)
 #define SetArgsStart \
   if (args_start == (const char *) NULL) \
     { \
@@ -176,17 +182,13 @@ static MagickBooleanType InvokePDFDelegate(const MagickBooleanType verbose,
     return(MagickFalse); \
   }
 
-  const char
-    *args_start=NULL;
-
-  int
-    status;
-
-#if defined(MAGICKCORE_GS_DELEGATE) || defined(MAGICKCORE_WINDOWS_SUPPORT)
   char
     **argv,
     *errors;
 
+  const char
+    *args_start=NULL;
+
   const GhostInfo
     *ghost_info;
 
index 7b2cf0f92df74ad532c931d8a104bced46dc30b5..9da0bd69fad20752a392a7d141c173a5bb085e88 100644 (file)
@@ -114,6 +114,7 @@ static MagickBooleanType
 %    o exception: return any errors or warnings in this structure.
 %
 */
+#if defined(MAGICKCORE_GS_DELEGATE) || defined(MAGICKCORE_WINDOWS_SUPPORT)
 static int MagickDLLCall PostscriptDelegateMessage(void *handle,
   const char *msg,int len)
 {
@@ -136,10 +137,15 @@ static int MagickDLLCall PostscriptDelegateMessage(void *handle,
   (*messages)[offset+len] ='\0';
   return(len);
 }
+#endif
 
 static MagickBooleanType InvokePostscriptDelegate(
   const MagickBooleanType verbose,const char *command,ExceptionInfo *exception)
 {
+  int
+    status;
+
+#if defined(MAGICKCORE_GS_DELEGATE) || defined(MAGICKCORE_WINDOWS_SUPPORT)
 #define SetArgsStart \
   if (args_start == (const char *) NULL) \
     { \
@@ -165,17 +171,13 @@ static MagickBooleanType InvokePostscriptDelegate(
     return(MagickFalse); \
   }
 
-  const char
-    *args_start=NULL;
-
-  int
-    status;
-
-#if defined(MAGICKCORE_GS_DELEGATE) || defined(MAGICKCORE_WINDOWS_SUPPORT)
   char
     **argv,
     *errors;
 
+  const char
+    *args_start=NULL;
+
   const GhostInfo
     *ghost_info;
 
index 03d6365220077133f4340c203af6689d44395e33..1fc21c9fccf155426b6fe9ac70b619cfbce34e4d 100644 (file)
@@ -203,9 +203,12 @@ static inline MagickBooleanType IsSupportedCombination(
         case VIPSBandFormatFLOAT:
         case VIPSBandFormatDOUBLE:
           return(MagickTrue);
+        default:
+          return(MagickFalse);
       }
+    default:
+      return(MagickFalse);
   }
-  return(MagickFalse);
 }
 
 static inline Quantum ReadVIPSPixelNONE(Image *image,
@@ -217,7 +220,7 @@ static inline Quantum ReadVIPSPixelNONE(Image *image,
     case VIPSTypeRGB:
       {
         unsigned char
-          c=0;
+          c;
 
         switch(format)
         {
@@ -239,6 +242,9 @@ static inline Quantum ReadVIPSPixelNONE(Image *image,
           case VIPSBandFormatDOUBLE:
             c=(unsigned char) ReadBlobDouble(image);
             break;
+          default:
+            c=0;
+            break;
         }
         return(ScaleCharToQuantum(c));
       }
@@ -246,7 +252,7 @@ static inline Quantum ReadVIPSPixelNONE(Image *image,
     case VIPSTypeRGB16:
       {
         unsigned short
-          s=0;
+          s;
 
         switch(format)
         {
@@ -264,6 +270,9 @@ static inline Quantum ReadVIPSPixelNONE(Image *image,
           case VIPSBandFormatDOUBLE:
             s=(unsigned short) ReadBlobDouble(image);
             break;
+          default:
+            s=0;
+            break;
         }
         return(ScaleShortToQuantum(s));
       }
@@ -285,9 +294,12 @@ static inline Quantum ReadVIPSPixelNONE(Image *image,
         case VIPSBandFormatDOUBLE:
           return((Quantum) ((double) QuantumRange*(ReadBlobDouble(
             image)/1.0)));
+        default:
+          return((Quantum) 0);
       }
+    default:
+      return((Quantum) 0);
   }
-  return((Quantum) 0);
 }
 
 static MagickBooleanType ReadVIPSPixelsNONE(Image *image,