]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation warning fixes (patch 625810)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 8 Jul 2003 23:19:01 +0000 (23:19 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 8 Jul 2003 23:19:01 +0000 (23:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/tiff/tif_compress.c
src/tiff/tif_dir.c
src/tiff/tif_getimage.c
src/tiff/tiffiop.h

index 97a08c20797043bee89f617d6e18ce1489a4424a..a7f9ef13ac62abd118a9799c3e20e396765a0e5a 100644 (file)
@@ -145,7 +145,7 @@ _TIFFSetDefaultCompressionState(TIFF* tif)
 }
 
 int
-TIFFSetCompressionScheme(TIFF* tif, int scheme)
+TIFFSetCompressionScheme(TIFF* tif, uint16 scheme)
 {
        const TIFFCodec *c = TIFFFindCODEC(scheme);
 
index facdf22542abdbab416791706b9e1a33b132b8a1..05283c2a6dbfed222ff919eb59f6f290faa4f9c5 100644 (file)
@@ -118,6 +118,7 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
        TIFFDirectory* td = &tif->tif_dir;
        int status = 1;
        uint32 v32;
+       uint16 v16;
        int i, v;
        double d;
        char* s;
@@ -152,14 +153,14 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
                }
                break;
        case TIFFTAG_COMPRESSION:
-               v = va_arg(ap, int) & 0xffff;
+               v16 = va_arg(ap, int) & 0xffff;
                /*
                 * If we're changing the compression scheme,
                 * the notify the previous module so that it
                 * can cleanup any state it's setup.
                 */
                if (TIFFFieldSet(tif, FIELD_COMPRESSION)) {
-                       if (td->td_compression == v)
+                       if (td->td_compression == v16)
                                break;
                        (*tif->tif_cleanup)(tif);
                        tif->tif_flags &= ~TIFF_CODERSETUP;
@@ -167,8 +168,8 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
                /*
                 * Setup new compression routine state.
                 */
-               if( (status = TIFFSetCompressionScheme(tif, v)) != 0 )
-                       td->td_compression = v;
+               if( (status = TIFFSetCompressionScheme(tif, v16)) != 0 )
+                       td->td_compression = v16;
                break;
        case TIFFTAG_PHOTOMETRIC:
                td->td_photometric = (uint16) va_arg(ap, int);
index 61aabb530782d3842c7dd4361364f220730c1744..810885e8511c9f09a7a17dba495f037a220e6007 100644 (file)
@@ -1542,12 +1542,12 @@ initYCbCrConversion(TIFFRGBAImage* img)
      */
     TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &hs, &vs);
     switch ((hs<<4)|vs) {
-    case 0x44: return (putcontig8bitYCbCr44tile);
-    case 0x42: return (putcontig8bitYCbCr42tile);
-    case 0x41: return (putcontig8bitYCbCr41tile);
-    case 0x22: return (putcontig8bitYCbCr22tile);
-    case 0x21: return (putcontig8bitYCbCr21tile);
-    case 0x11: return (putcontig8bitYCbCr11tile);
+    case 0x44: return (&putcontig8bitYCbCr44tile);
+    case 0x42: return (&putcontig8bitYCbCr42tile);
+    case 0x41: return (&putcontig8bitYCbCr41tile);
+    case 0x22: return (&putcontig8bitYCbCr22tile);
+    case 0x21: return (&putcontig8bitYCbCr21tile);
+    case 0x11: return (&putcontig8bitYCbCr11tile);
     }
     return (NULL);
 }
index 269780712919ac51b19d29152b694fb0e993239b..cb0a20c079816c6696215e4e35799cc4343c6cf2 100644 (file)
@@ -213,7 +213,7 @@ extern      void _TIFFSwab64BitData(TIFF*, tidata_t, tsize_t);
 extern int  TIFFFlushData1(TIFF*);
 extern void  TIFFFreeDirectory(TIFF*);
 extern int  TIFFDefaultDirectory(TIFF*);
-extern int  TIFFSetCompressionScheme(TIFF*, int);
+extern int  TIFFSetCompressionScheme(TIFF*, uint16);
 extern int  TIFFSetDefaultCompressionState(TIFF*);
 extern uint32 _TIFFDefaultStripSize(TIFF*, uint32);
 extern void _TIFFDefaultTileSize(TIFF*, uint32*, uint32*);