netpbm/netpbm-gcc-warnings.patch
Petr Gajdos 858b8422cb - version update to 10.96.4
palmtopnm: Fix bug: fails with PackBits input on platform with
    default unsigned char, such as ppc64.  Always broken.  (Ability
    to convert PackBits input was new in Netpbm 10.27 (March 2005).
    sunicontopnm, escp2topbm, mgrtopbm, ybmtopbm, pamcut, pbmpscale,
    pnmcat, pnmpad: Fix arithmetic overrun with ridiculously large
    image.
    pamrubber: Fix bug: random behavior with -quad when you specify
    both points for source or target and the second one is lower in
    the image than the first.  Always broken (Pamrubber was new in
    Netpbm 10.54 (March 2011)).
    libnetpbm: When validating computable size of width and height,
    allow for adding up to 10 instead of 2, to account for rounding
    up to a multiple of 8 in processing bit maps.
    pamtogif: Fix bug: doesn't ignore the input alpha mask when user
    specified -transparent.  Broken in Netpbm 10.37 (December 2006).
    pgmtoppm: Eliminate dependency on color dictionary when user
    does not specify any colors by name.
    pamstereogram: Fix crash with -xbegin=0.  Thanks Scott Pakin.
    Introduced in Netpbm 10.94.
    pamtopng: Fix rejection of all BLACKANDWHITE_ALPHA images with
    message about wrong depth.  Always broken (pamtopng was new in
    Netpbm 10.71 (June 2015)).  Thanks Karol Kosek
    <krkk@krkk.ct8.pl>.
    pamtopng: Fix failure with GRAYSCALE_ALPHA images with maxval
    less than 255.  Always broken (pamtopng was new in Netpbm 10.71
    (June 2015)).  Thanks Karol Kosek <krkk@krkk.ct8.pl>.
    pamtopng: Fix: treats all tuple types that start with BLA as
    BLACKANDWHITE.  Always broken (pamtopng was new in Netpbm 10.71
    (June 2015)).

OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=124
2021-12-13 12:35:32 +00:00

46 lines
1.5 KiB
Diff

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;
}
}