]> Creatis software - gdcm.git/blobdiff - src/jpeg/libijg/jmemnobs.c
ENH: Fix the remaining warnings using: diff -u --strip-trailing-cr --ignore-space...
[gdcm.git] / src / jpeg / libijg / jmemnobs.c
index eb8c337725fd85f289b04eebbea8549d90d53c77..7e53479f3d93c38b858a7ec05fd3dafcd6e01419 100644 (file)
@@ -18,9 +18,9 @@
 #define JPEG_INTERNALS
 #include "jinclude.h"
 #include "jpeglib.h"
-#include "jmemsys.h"           /* import the system-dependent declarations */
+#include "jmemsys.h"    /* import the system-dependent declarations */
 
-#ifndef HAVE_STDLIB_H          /* <stdlib.h> should declare malloc(),free() */
+#ifndef HAVE_STDLIB_H    /* <stdlib.h> should declare malloc(),free() */
 extern void * malloc JPP((size_t size));
 extern void free JPP((void *ptr));
 #endif
@@ -34,12 +34,15 @@ extern void free JPP((void *ptr));
 GLOBAL(void *)
 jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
 {
+  cinfo = 0;
   return (void *) malloc(sizeofobject);
 }
 
 GLOBAL(void)
 jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 {
+  cinfo = 0;
+  sizeofobject = 0;
   free(object);
 }
 
@@ -54,12 +57,15 @@ jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 GLOBAL(void FAR *)
 jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
 {
+  cinfo = 0;
   return (void FAR *) malloc(sizeofobject);
 }
 
 GLOBAL(void)
 jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 {
+  cinfo = 0;
+  sizeofobject = 0;
   free(object);
 }
 
@@ -71,8 +77,11 @@ jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 
 GLOBAL(long)
 jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
-                   long max_bytes_needed, long already_allocated)
+        long max_bytes_needed, long already_allocated)
 {
+  cinfo = 0;
+  min_bytes_needed = 0;
+  already_allocated = 0;
   return max_bytes_needed;
 }
 
@@ -85,8 +94,10 @@ jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
 
 GLOBAL(void)
 jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
-                        long total_bytes_needed)
+       long total_bytes_needed)
 {
+  info = 0;
+  total_bytes_needed = 0;
   ERREXIT(cinfo, JERR_NO_BACKING_STORE);
 }
 
@@ -99,11 +110,13 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 GLOBAL(long)
 jpeg_mem_init (j_common_ptr cinfo)
 {
-  return 0;                    /* just set max_memory_to_use to 0 */
+  cinfo = 0;
+  return 0;      /* just set max_memory_to_use to 0 */
 }
 
 GLOBAL(void)
 jpeg_mem_term (j_common_ptr cinfo)
 {
+  cinfo = 0;
   /* no work */
 }