]> granicus.if.org Git - libjpeg-turbo/commitdiff
Fix compiler warning w/ 32-bit MSVC builds
authorDRC <information@libjpeg-turbo.org>
Sun, 1 Apr 2018 02:48:20 +0000 (21:48 -0500)
committerDRC <information@libjpeg-turbo.org>
Sun, 1 Apr 2018 02:49:01 +0000 (21:49 -0500)
jmemnobs.c

index 6191aaa340358d126c132dc17ca02648c12f8c4f..089be8f500d251c00cd314dba3750e544fc9f2bd 100644 (file)
@@ -4,7 +4,7 @@
  * This file was part of the Independent JPEG Group's software:
  * Copyright (C) 1992-1996, Thomas G. Lane.
  * libjpeg-turbo Modifications:
- * Copyright (C) 2017, D. R. Commander.
+ * Copyright (C) 2017-2018, D. R. Commander.
  * For conditions of distribution and use, see the accompanying README.ijg
  * file.
  *
@@ -72,7 +72,7 @@ jpeg_mem_available(j_common_ptr cinfo, size_t min_bytes_needed,
                    size_t max_bytes_needed, size_t already_allocated)
 {
   if (cinfo->mem->max_memory_to_use) {
-    if (cinfo->mem->max_memory_to_use > already_allocated)
+    if ((size_t)cinfo->mem->max_memory_to_use > already_allocated)
       return cinfo->mem->max_memory_to_use - already_allocated;
     else
       return 0;