diff options
| author | Ian Elliott <ian@lunarg.com> | 2015-02-13 14:29:21 -0700 |
|---|---|---|
| committer | Ian Elliott <ian@lunarg.com> | 2015-02-13 16:33:45 -0700 |
| commit | 1e42dff923e31f9d2b939f281356f7450f9258f5 (patch) | |
| tree | 9297641e2d2add9dc4e8b96486c0be8dd620609a | |
| parent | f6da0ddd4d4212667ff822576f7cc4e592b63a33 (diff) | |
| download | usermoji-1e42dff923e31f9d2b939f281356f7450f9258f5.tar.xz | |
Eliminate "-Wsign-compare" warnings on Linux ...
With these being newly enabled for the loader, layers, and demos (and it turns
out, for the icd/common directory), it is appropriate to fix them.
| -rw-r--r-- | demos/cube.c | 4 | ||||
| -rw-r--r-- | icd/common/icd-enumerate-drm.c | 2 | ||||
| -rw-r--r-- | icd/common/icd-log.c | 2 | ||||
| -rw-r--r-- | loader/loader.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/demos/cube.c b/demos/cube.c index 00951b5a..42a95709 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -561,8 +561,8 @@ bool loadTexture(char *filename, uint8_t *rgba_data, { //header for testing if it is a png png_byte header[8]; - int i, is_png, bit_depth, color_type,rowbytes; - png_uint_32 twidth, theight; + int is_png, bit_depth, color_type,rowbytes; + png_uint_32 i, twidth, theight; png_structp png_ptr; png_infop info_ptr, end_info; png_byte *image_data; diff --git a/icd/common/icd-enumerate-drm.c b/icd/common/icd-enumerate-drm.c index f65ceca4..fbb00d73 100644 --- a/icd/common/icd-enumerate-drm.c +++ b/icd/common/icd-enumerate-drm.c @@ -186,7 +186,7 @@ void icd_drm_release(struct icd_drm_device *devices) while (dev) { struct icd_drm_device *next = dev->next; - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(dev->minors); i++) udev_device_unref((struct udev_device *) dev->minors[i]); diff --git a/icd/common/icd-log.c b/icd/common/icd-log.c index 3b930511..8452002f 100644 --- a/icd/common/icd-log.c +++ b/icd/common/icd-log.c @@ -169,7 +169,7 @@ void icd_logv(XGL_DBG_MSG_TYPE msg_type, int ret; ret = vsnprintf(msg, sizeof(msg), format, ap); - if (ret >= sizeof(msg) || ret < 0) + if ((ret >= (int) sizeof(msg)) || ret < 0) msg[sizeof(msg) - 1] = '\0'; icd_log_str(msg_type, validation_level, src_object, diff --git a/loader/loader.c b/loader/loader.c index 52be50e4..34df4a5e 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -177,7 +177,7 @@ static void loader_log(XGL_DBG_MSG_TYPE msg_type, int32_t msg_code, va_start(ap, format); ret = vsnprintf(msg, sizeof(msg), format, ap); - if (ret >= sizeof(msg) || ret < 0) { + if ((ret >= (int) sizeof(msg)) || ret < 0) { msg[sizeof(msg) - 1] = '\0'; } va_end(ap); @@ -1058,7 +1058,7 @@ LOADER_EXPORT XGL_RESULT XGLAPI xglEnumerateLayers(XGL_PHYSICAL_GPU gpu, size_t if ((fpEnumerateLayers = loader_platform_get_proc_address(handle, "xglEnumerateLayers")) == NULL) { //use default layer name based on library name XGL_LAYER_LIBRARY_PREFIX<name>.XGL_LIBRARY_SUFFIX char *pEnd, *cpyStr; - int siz; + size_t siz; loader_platform_close_library(handle); lib_name = basename(lib_name); pEnd = strrchr(lib_name, '.'); |
