[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] TIFF warnings (errors, really)
From: |
Jeff Teunissen |
Subject: |
[PATCH] TIFF warnings (errors, really) |
Date: |
Sat, 03 Mar 2001 23:57:23 -0500 |
This patch, on the surface, cleans up some warnings in libgnustep-gui's TIFF
handling.
tiff.m: In function `NSTiffOpenDataRead':
tiff.m:203: warning: passing arg 1 of `TIFFSetErrorHandler' from incompatible
pointer type
tiff.m:204: warning: passing arg 1 of `TIFFSetWarningHandler' from
incompatible pointer type
tiff.m:219: warning: passing arg 4 of `TIFFClientOpen' from incompatible
pointer type
tiff.m:219: warning: passing arg 5 of `TIFFClientOpen' from incompatible
pointer type
tiff.m: In function `NSTiffOpenDataWrite':
tiff.m:238: warning: passing arg 4 of `TIFFClientOpen' from incompatible
pointer type
tiff.m:238: warning: passing arg 5 of `TIFFClientOpen' from incompatible
pointer type
After comparing -gui's use of the functions, I discovered a couple of
irregularities:
The third arg of TIFFErrorHandler functions is (according to tiffio.h)
"va_list", not "...".
I believe this could have caused problems. :)
Also, the third arg of TIFFReadWriteProc functions is tsize_t, not toff_t.
--
| Jeff Teunissen - Pres., Dusk To Dawn Computing - deek at dusknet.dhs.org
| GPG: 1024D/9840105A 7102 808A 7733 C2F3 097B 161B 9222 DAB8 9840 105A
| Core developer, The QuakeForge Project http://www.quakeforge.net/
| Specializing in Debian GNU/Linux http://dusknet.dhs.org/~deek/
Index: Source/tiff.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/tiff.m,v
retrieving revision 1.18
diff -u -r1.18 tiff.m
--- Source/tiff.m 2000/09/27 15:16:17 1.18
+++ Source/tiff.m 2001/03/04 04:40:51
@@ -82,32 +82,26 @@
static int tiff_error_handler_set = 0;
static void
-NSTiffError(const char *func, const char *msg, ...)
+NSTiffError(const char *func, const char *msg, va_list ap)
{
NSString *format;
- va_list ap;
format = [NSString stringWithFormat: @"Tiff Error (%s) %s", func, msg];
- va_start (ap, msg);
NSLogv (format, ap);
- va_end (ap);
}
static void
-NSTiffWarning(const char *func, const char *msg, ...)
+NSTiffWarning(const char *func, const char *msg, va_list ap)
{
NSString *format;
- va_list ap;
format = [NSString stringWithFormat: @"Tiff Warning (%s) %s", func, msg];
- va_start (ap, msg);
NSLogv (format, ap);
- va_end (ap);
}
/* Client functions that provide reading/writing of data for libtiff */
static tsize_t
-TiffHandleRead(thandle_t handle, tdata_t buf, toff_t count)
+TiffHandleRead(thandle_t handle, tdata_t buf, tsize_t count)
{
chandle_t* chand = (chandle_t *)handle;
if (chand->position >= chand->size)
@@ -119,7 +113,7 @@
}
static tsize_t
-TiffHandleWrite(thandle_t handle, tdata_t buf, toff_t count)
+TiffHandleWrite(thandle_t handle, tdata_t buf, tsize_t count)
{
chandle_t* chand = (chandle_t *)handle;
if (chand->mode == "r")
- [PATCH] TIFF warnings (errors, really),
Jeff Teunissen <=