[newlib-cygwin/main] Cygwin: errmap[]: reduce value size from 32 to 8 bits

Corinna Vinschen corinna@sourceware.org
Mon Feb 26 15:47:07 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4f843719d35df425f3882876fd32a908a6750537

commit 4f843719d35df425f3882876fd32a908a6750537
Author:     Christian Franke <christian.franke@t-online.de>
AuthorDate: Mon Feb 26 14:01:54 2024 +0100
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Mon Feb 26 15:56:10 2024 +0100

    Cygwin: errmap[]: reduce value size from 32 to 8 bits
    
    Overflow would be detected at compile time.
    
    Signed-off-by: Christian Franke <christian.franke@t-online.de>

Diff:
---
 winsup/cygwin/local_includes/errmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/local_includes/errmap.h b/winsup/cygwin/local_includes/errmap.h
index 737c01c8b869..eacf9cd1ca9a 100644
--- a/winsup/cygwin/local_includes/errmap.h
+++ b/winsup/cygwin/local_includes/errmap.h
@@ -3,7 +3,7 @@
    to this new array manually on demand. */
 
 /* FIXME: Some of these choices are arbitrary! */
-constexpr int errmap[] =
+constexpr uint8_t errmap[] =
 {
   0,			/* ERROR_SUCCESS */
   EBADRQC,		/* ERROR_INVALID_FUNCTION */


More information about the Cygwin-cvs mailing list