aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Madill <jmadill@chromium.org>2017-11-08 14:48:32 -0500
committerMark Lobodzinski <mark@lunarg.com>2017-11-27 15:30:19 -0700
commit6d7a500f365ee90584222f3fe332ffd95d1f9c41 (patch)
tree013c10d76dbf97ba0ad1974af1b6d01391c135ae
parent96f1de2a229a18f32e32d1c4197574e68a446a50 (diff)
downloadusermoji-6d7a500f365ee90584222f3fe332ffd95d1f9c41.tar.xz
loader: Fix improper cast warning.
warning C4057: 'function': 'LPBYTE' differs in indirection to slightly different base types This was popping up in some Windows builds. Also add it to the list of warnings enabled by default with MSVS. Change-Id: I2703f2e57ba3fb33ec03fbc7b8324c75187abec6
-rw-r--r--CMakeLists.txt2
-rw-r--r--loader/loader.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fdc63bd4..785d6fc9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,6 +94,8 @@ if(WIN32)
# Warn about potentially uninitialized variables
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/w34701>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/w34703>")
+ # Warn about different indirection types.
+ add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/w34057>")
endif()
if(NOT WIN32)
diff --git a/loader/loader.c b/loader/loader.c
index 8f954e06..ca6d5719 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -465,7 +465,7 @@ bool loaderGetDeviceRegistryEntry(const struct loader_instance *inst, char **reg
value_name,
NULL,
&data_type,
- manifest_path,
+ (BYTE *)manifest_path,
&requiredSize
);