summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2018-02-22 22:52:58 -0500
committerJune McEnroe <programble@gmail.com>2018-02-22 22:52:58 -0500
commit8b359ffb6f8075bdb065c045a9b900c7f99a2a97 (patch)
tree7ca80c92985b280511ba9b1ddb7fbf72a331971b /bin
parentFix zlib types on 32-bit (diff)
downloadsrc-8b359ffb6f8075bdb065c045a9b900c7f99a2a97.tar.gz
src-8b359ffb6f8075bdb065c045a9b900c7f99a2a97.zip
Abort on other values of enums in pngo
Diffstat (limited to '')
-rw-r--r--bin/pngo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/pngo.c b/bin/pngo.c
index 5cd8cb1c..bad5b953 100644
--- a/bin/pngo.c
+++ b/bin/pngo.c
@@ -132,6 +132,7 @@ static size_t lineSize(void) {
         case INDEXED:         return (header.width * 1 * header.depth + 7) / 8;
         case GRAYSCALE_ALPHA: return (header.width * 2 * header.depth + 7) / 8;
         case TRUECOLOR_ALPHA: return (header.width * 4 * header.depth + 7) / 8;
+        default: abort();
     }
 }
 
@@ -345,6 +346,7 @@ static uint8_t recon(enum Filter type, struct Bytes f) {
         case UP:      return f.x + f.b;
         case AVERAGE: return f.x + ((uint32_t)f.a + (uint32_t)f.b) / 2;
         case PAETH:   return f.x + paethPredictor(f);
+        default:      abort();
     }
 }
 
@@ -355,6 +357,7 @@ static uint8_t filt(enum Filter type, struct Bytes f) {
         case UP:      return f.x - f.b;
         case AVERAGE: return f.x - ((uint32_t)f.a + (uint32_t)f.b) / 2;
         case PAETH:   return f.x - paethPredictor(f);
+        default:      abort();
     }
 }