]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
mkerr: Fix string literal conversion
authorSven Schwermer <sven.schwermer@disruptive-technologies.com>
Thu, 27 May 2021 06:33:08 +0000 (08:33 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 28 May 2021 12:22:45 +0000 (14:22 +0200)
This fixes a compiler warning on clang-1205.0.22.9 when compiling the
generated code as C++11:

ISO C++11 does not allow conversion from string literal to 'char *'
[-Wwritable-strings]

CLA: trivial

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15495)

util/mkerr.pl

index ab25b8fc96ae142cd60e2a3c582073ea487ae105..1cb772c00f1081886b2ee31f7277cbee23ed38b2 100755 (executable)
@@ -459,7 +459,7 @@ extern \"C\" {
 # endif
 int ERR_load_${lib}_strings(void);
 void ERR_unload_${lib}_strings(void);
-void ERR_${lib}_error(int function, int reason, char *file, int line);
+void ERR_${lib}_error(int function, int reason, const char *file, int line);
 # ifdef  __cplusplus
 }
 # endif
@@ -621,7 +621,7 @@ ${st}void ERR_unload_${lib}_strings(void)
     }
 }
 
-${st}void ERR_${lib}_error(int function, int reason, char *file, int line)
+${st}void ERR_${lib}_error(int function, int reason, const char *file, int line)
 {
     if (lib_code == 0)
         lib_code = ERR_get_next_error_library();