File netpbm-gcc-warnings.patch of Package netpbm

Index: netpbm-10.96.4/converter/other/pngx.c
===================================================================
--- netpbm-10.96.4.orig/converter/other/pngx.c	2021-12-13 13:11:50.248594206 +0100
+++ netpbm-10.96.4/converter/other/pngx.c	2021-12-13 13:23:28.772862475 +0100
@@ -368,6 +368,7 @@ pngx_srgbIntentDesc(pngx_srgbIntent cons
     case PNGX_ABSOLUTE_COLORIMETRIC: return "ABSOLUTE_COLORIMETRIC";
     }
     assert(false);
+    return NULL;
 }
 
 
@@ -383,6 +384,7 @@ const libpngSrgbIntentCode(pngx_srgbInte
     }
 
     assert(false);  /* All cases above return */
+    return -1;
 }
 
 
Index: netpbm-10.96.4/lib/libpm.c
===================================================================
--- netpbm-10.96.4.orig/lib/libpm.c	2021-12-13 13:23:28.760862403 +0100
+++ netpbm-10.96.4/lib/libpm.c	2021-12-13 13:23:28.776862501 +0100
@@ -440,6 +440,7 @@ pm_maxvaltobits(int const maxval) {
         pm_error( "maxval of %d is too large!", maxval );
 
     assert(false);
+    return 0;
 }
 
 int
Index: netpbm-10.96.4/lib/libpnm3.c
===================================================================
--- netpbm-10.96.4.orig/lib/libpnm3.c	2021-12-13 13:11:56.508632602 +0100
+++ netpbm-10.96.4/lib/libpnm3.c	2021-12-13 13:23:28.776862501 +0100
@@ -429,6 +429,8 @@ pnm_bittoxel(bit    const inputBit,
     case PBM_WHITE: return pnm_whitexel(maxval, PBM_TYPE); break;
     default:
         assert(false);
+        pixel const black = {0, 0, 0};
+        return black;
     }
 }
 
openSUSE Build Service is sponsored by