diff options
| author | Jamie Madill <jmadill@chromium.org> | 2016-12-14 17:21:43 -0500 |
|---|---|---|
| committer | Mark Young <marky@lunarg.com> | 2016-12-15 13:42:01 -0700 |
| commit | 6bbdb6f380e71d5db2d482bdd7380f5d3754c10b (patch) | |
| tree | f100e4f50ce8013df802dab8c77285659302d7e9 | |
| parent | fe543f83a6dc9f2bbded8e30eb2afea8ba6c6038 (diff) | |
| download | usermoji-6bbdb6f380e71d5db2d482bdd7380f5d3754c10b.tar.xz | |
loader: Fix Clang warnings.
error: equality comparison with extraneous parentheses
error: comparison of array equal to a null pointer is always false
error: using namespace directive in global context in header
Change-Id: I52b5d9062653b9429b9c42b40eca54e71b6d794b
| -rw-r--r-- | loader/loader.c | 11 | ||||
| -rw-r--r-- | loader/vk_loader_platform.h | 1 |
2 files changed, 4 insertions, 8 deletions
diff --git a/loader/loader.c b/loader/loader.c index 85b5f48c..2ed52c4b 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -3799,8 +3799,7 @@ VkResult loader_create_instance_chain(const VkInstanceCreateInfo *pCreateInfo, continue; if ((fpGIPA = layer_prop->functions.get_instance_proc_addr) == NULL) { - if (layer_prop->functions.str_gipa == NULL || - strlen(layer_prop->functions.str_gipa) == 0) { + if (strlen(layer_prop->functions.str_gipa) == 0) { fpGIPA = (PFN_vkGetInstanceProcAddr) loader_platform_get_proc_address( lib_handle, "vkGetInstanceProcAddr"); @@ -3914,8 +3913,7 @@ loader_create_device_chain(const struct loader_physical_device_tramp *pd, continue; if ((fpGIPA = layer_prop->functions.get_instance_proc_addr) == NULL) { - if (layer_prop->functions.str_gipa == NULL || - strlen(layer_prop->functions.str_gipa) == 0) { + if (strlen(layer_prop->functions.str_gipa) == 0) { fpGIPA = (PFN_vkGetInstanceProcAddr) loader_platform_get_proc_address( lib_handle, "vkGetInstanceProcAddr"); @@ -3933,8 +3931,7 @@ loader_create_device_chain(const struct loader_physical_device_tramp *pd, } } if ((fpGDPA = layer_prop->functions.get_device_proc_addr) == NULL) { - if (layer_prop->functions.str_gdpa == NULL || - strlen(layer_prop->functions.str_gdpa) == 0) { + if (strlen(layer_prop->functions.str_gdpa) == 0) { fpGDPA = (PFN_vkGetDeviceProcAddr) loader_platform_get_proc_address(lib_handle, "vkGetDeviceProcAddr"); @@ -4464,7 +4461,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumeratePhysicalDevices( } res = icd_term->EnumeratePhysicalDevices( icd_term->instance, &(phys_devs[i].count), phys_devs[i].phys_devs); - if ((res == VK_SUCCESS)) { + if (res == VK_SUCCESS) { inst->total_gpu_count += phys_devs[i].count; } else { return res; diff --git a/loader/vk_loader_platform.h b/loader/vk_loader_platform.h index 4c48090f..a2649f08 100644 --- a/loader/vk_loader_platform.h +++ b/loader/vk_loader_platform.h @@ -234,7 +234,6 @@ loader_platform_thread_cond_broadcast(loader_platform_thread_cond *pCond) { #ifdef __cplusplus #include <iostream> #include <string> -using namespace std; #endif // __cplusplus // VK Library Filenames, Paths, etc.: |
