]> git.plutz.net Git - stereofy/blobdiff - anaglyph.c
cleaned up fprintf function, fixing last compiler warning, enabled hard optimization...
[stereofy] / anaglyph.c
index ad3f609e7a90f441eb54e579de95c86a3ac1c46f..b0be61c53b1bc66bcda7ea27a3a18dc9a134383a 100644 (file)
@@ -51,13 +51,13 @@ int main(int argc, char *argv[]){
 int error(int code){
   char *msg = "Unknown Error\n";
   switch (code) {
-    case 1: msg = "Usage: anaglyph [ -[fhd]gm | -[fhd]rc | -fmc | -dab ] left.rgb right.rgb output.rgb\n";
-    case 2: msg = "Could not open input file for reading\n";
-    case 3: msg = "Could not open output file for writing\n";
-    case 4: msg = "Unexpected end of file\n";
-    case 5: msg = "Cannot write to output file\n";
+    case 1: msg = "Usage: anaglyph [ -[fhd]gm | -[fhd]rc | -fmc | -dab ] left.rgb right.rgb output.rgb\n"; break;
+    case 2: msg = "Could not open input file for reading\n"; break;
+    case 3: msg = "Could not open output file for writing\n"; break;
+    case 4: msg = "Unexpected end of file\n"; break;
+    case 5: msg = "Cannot write to output file\n"; break;
   }
-  fprintf(stderr, msg); return code;
+  fprintf(stderr, "%s", msg); return code;
 }
 
 // min-max to prevent overflowing in Dubois calculations