diff options
authorEdward Welbourne <>2019-10-10 17:17:29 +0200
committerEdward Welbourne <>2019-10-14 14:10:46 +0200
commit689405fb5ce5a2ff7446e1d110a7686184270f89 (patch)
parent55427858e3f9d98dc7a75638c54a4fffde6be73a (diff)
Use arrays rather than assigning literals to char* (warning-fix)
Integrity has a hack, to let us link to the library mmap is in, that depends on two extern "C" symbols of type char *; but assigning a string literal to a char * variable as initializer is a const-ness violation (as the Integrity compiler does point out), so change the two variables to be char[] instead of char *, so that the literals populate (and determine the size of) the arrays, instead. Change-Id: Iab34fb378bc0522e14539592ead066f068751ad0 Reviewed-by: Qt CI Bot <> Reviewed-by: Thiago Macieira <>
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 30a44aeef8..78ad2a5421 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -110,8 +110,8 @@ extern "C" {
// without full system POSIX.
# pragma weak shm_area_password
# pragma weak shm_area_name
- char *shm_area_password = "dummy";
- char *shm_area_name = "dummy";
+ char shm_area_password[] = "dummy";
+ char shm_area_name[] = "dummy";