Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 859309 Details for
Bug 902483
media-libs/netpbm-11.1.1: -Wreturn-type warnings
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
fix the warnings - take 2
netpbm-11.2.0-return-type-warnings.patch (text/plain), 1.70 KB, created by
Viorel Munteanu
on 2023-03-31 06:56:39 UTC
(
hide
)
Description:
fix the warnings - take 2
Filename:
MIME Type:
Creator:
Viorel Munteanu
Created:
2023-03-31 06:56:39 UTC
Size:
1.70 KB
patch
obsolete
>Fix -Werror=return-type errors. > >See also https://bugs.gentoo.org/902483 > >--- a/converter/other/pngx.c >+++ b/converter/other/pngx.c >@@ -368,6 +368,7 @@ > case PNGX_ABSOLUTE_COLORIMETRIC: return "ABSOLUTE_COLORIMETRIC"; > } > assert(false); >+ abort(); > } > > >@@ -383,6 +384,7 @@ > } > > assert(false); /* All cases above return */ >+ abort(); > } > > >--- a/editor/pamcat.c >+++ b/editor/pamcat.c >@@ -1211,6 +1211,7 @@ > case JUST_CENTER: return (outpamP->width - inpamP->width) / 2; > } > assert(false); >+ abort(); > } > > >--- a/lib/libpnm3.c >+++ b/lib/libpnm3.c >@@ -433,6 +433,7 @@ > case PBM_WHITE: return pnm_whitexel(maxval, PBM_TYPE); break; > default: > assert(false); >+ abort(); > } > } > >--- a/lib/pm.h >+++ b/lib/pm.h >@@ -94,6 +94,15 @@ > #define PM_S_IRUSR S_IRUSR > #endif > >+/* define NORETURN macro to fix -Werror=return-type */ >+#if __STDC_VERSION__ > 202300L >+#define NORETURN [[noreturn]] >+#elif __STDC_VERSION__ >= 201112L >+#define NORETURN _Noreturn >+#else >+#define NORETURN >+#endif >+ > > > typedef struct { >@@ -181,7 +190,7 @@ > pm_setjmpbufsave(jmp_buf * const jmpbufP, > jmp_buf ** const oldJmpbufPP); > >-void >+void NORETURN > pm_longjmp(void); > > void >@@ -216,7 +225,7 @@ > void PM_GNU_PRINTF_ATTR(1,2) > pm_errormsg(const char format[], ...); > >-void PM_GNU_PRINTF_ATTR(1,2) >+void PM_GNU_PRINTF_ATTR(1,2) NORETURN > pm_error (const char reason[], ...); > > int >--- a/lib/libpm.c >+++ b/lib/libpm.c >@@ -91,7 +91,7 @@ > > > >-void >+void NORETURN > pm_longjmp(void) { > > if (pm_jmpbufP) >@@ -258,7 +258,7 @@ > > > >-void PM_GNU_PRINTF_ATTR(1,2) >+void PM_GNU_PRINTF_ATTR(1,2) NORETURN > pm_error(const char format[], ...) { > va_list args; > const char * msg;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 902483
:
858499
|
859223
| 859309