summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-10-10 17:17:29 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-10-14 14:10:46 +0200
commit689405fb5ce5a2ff7446e1d110a7686184270f89 (patch)
tree48efa68d8abb90cd4f60f11930d9f3095d1423d7 /src
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 <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.cpp4
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";
}
#endif