about summary refs log tree commit diff
path: root/converter/other/infotopam.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-04-10 16:07:24 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-04-10 16:07:24 +0000
commit7d714381d1af9f51ae0094df79e1fe8d28c46b84 (patch)
treecf576cb526aa84b025b3bb599062e1849a55a3b0 /converter/other/infotopam.c
parent73225706f044df73549d0982e782b41ff94e117f (diff)
downloadnetpbm-mirror-7d714381d1af9f51ae0094df79e1fe8d28c46b84.tar.gz
netpbm-mirror-7d714381d1af9f51ae0094df79e1fe8d28c46b84.tar.xz
netpbm-mirror-7d714381d1af9f51ae0094df79e1fe8d28c46b84.zip
Fix compiler warnings
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1185 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/infotopam.c')
-rw-r--r--converter/other/infotopam.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/converter/other/infotopam.c b/converter/other/infotopam.c
index 21fa8ee2..69080a35 100644
--- a/converter/other/infotopam.c
+++ b/converter/other/infotopam.c
@@ -233,33 +233,33 @@ getDiskObject( IconInfo * const infoP ) {
     /* Read the disk object header */
     bytesRead = fread( &dobj, 1, sizeof(dobj), infoP->fp );
     if (ferror(infoP->fp))
-        pm_error( "Cannot read disk object header for file '%s'.  "
-                  "fread() errno = %d (%s)",
-                  infoP->name, errno, strerror( errno ) );
-    else if ( bytesRead != sizeof(dobj) )
-        pm_error( "Cannot read entire disk object header for file '%s'.  "
-                  "Only read 0x%X of 0x%X bytes",
-                  infoP->name, bytesRead, sizeof(dobj) );
+        pm_error("Cannot read disk object header for file '%s'.  "
+                 "fread() errno = %d (%s)",
+                 infoP->name, errno, strerror(errno));
+    else if (bytesRead != sizeof(dobj))
+        pm_error("Cannot read entire disk object header for file '%s'.  "
+                 "Only read 0x%X of 0x%X bytes",
+                 infoP->name, (unsigned)bytesRead, (unsigned)sizeof(dobj));
 
     /* Check magic number */
-    if ( ( dobj.magic[0] != 0xE3 ) && ( dobj.magic[1] != 0x10 ) )
-        pm_error( "Wrong magic number for file '%s'.  "
-                  "Expected 0xE310, but got 0x%X%X",
-                  infoP->name, dobj.magic[0], dobj.magic[1] );
+    if ((dobj.magic[0] != 0xE3) && (dobj.magic[1] != 0x10))
+        pm_error("Wrong magic number for file '%s'.  "
+                 "Expected 0xE310, but got 0x%X%X",
+                 infoP->name, dobj.magic[0], dobj.magic[1]);
 
     /* Set version info and have drawer data flag */
-    infoP->version     = ( dobj.version[0]     <<  8 ) +
-        ( dobj.version[1]           );
-    infoP->drawerData  = ( dobj.pDrawerData[0] << 24 ) +
-        ( dobj.pDrawerData[1] << 16 ) +
-        ( dobj.pDrawerData[2] <<  8 ) +
-        ( dobj.pDrawerData[3]       ) ? TRUE : FALSE;
+    infoP->version     = (dobj.version[0]     <<  8) +
+        (dobj.version[1]           );
+    infoP->drawerData  = (dobj.pDrawerData[0] << 24) +
+        (dobj.pDrawerData[1] << 16) +
+        (dobj.pDrawerData[2] <<  8) +
+        (dobj.pDrawerData[3]      ) ? TRUE : FALSE;
 }
 
 
 
 static void 
-getIconHeader( IconInfo * const infoP ) {
+getIconHeader(IconInfo * const infoP) {
 /*-------------------------------------------------------------------------
  * Get fields from icon header portion of info file
  *-------------------------------------------------------------------------*/
@@ -267,25 +267,25 @@ getIconHeader( IconInfo * const infoP ) {
     size_t      bytesRead;
 
     /* Read icon header */
-    bytesRead = fread( &ihead, 1, sizeof(ihead), infoP->fp );
-    if ( ferror(infoP->fp ) )
-         pm_error( "Cannot read icon header for file '%s'.  "
-                   "fread() errno = %d (%s)",
-                   infoP->name, errno, strerror( errno ) );
-    else if ( bytesRead != sizeof(ihead) )
-        pm_error( "Cannot read the entire icon header for file '%s'.  "
-                  "Only read 0x%X of 0x%X bytes",
-                  infoP->name, bytesRead, sizeof(ihead) );
+    bytesRead = fread(&ihead, 1, sizeof(ihead), infoP->fp);
+    if (ferror(infoP->fp))
+        pm_error("Cannot read icon header for file '%s'.  "
+                 "fread() errno = %d (%s)",
+                 infoP->name, errno, strerror(errno));
+    else if (bytesRead != sizeof(ihead))
+        pm_error("Cannot read the entire icon header for file '%s'.  "
+                 "Only read 0x%X of 0x%X bytes",
+                 infoP->name, (unsigned)bytesRead, (unsigned)sizeof(ihead));
 
     /* Get icon width, heigh, and bitplanes */
-    infoP->width  = ( ihead.iconWidth[0]  << 8 ) + ihead.iconWidth[1];
-    infoP->height = ( ihead.iconHeight[0] << 8 ) + ihead.iconHeight[1];
-    infoP->depth  = ( ihead.bpp[0]        << 8 ) + ihead.bpp[1];
+    infoP->width  = (ihead.iconWidth[0]  << 8) + ihead.iconWidth[1];
+    infoP->height = (ihead.iconHeight[0] << 8) + ihead.iconHeight[1];
+    infoP->depth  = (ihead.bpp[0]        << 8) + ihead.bpp[1];
 
     /* Check number of bit planes */
-    if ( ( infoP->depth > 2 ) || ( infoP->depth < 1 ) )
-        pm_error( "We don't know how to interpret %u bitplanes file '%s'.  ",
-                  infoP->depth, infoP->name );
+    if ((infoP->depth > 2) || (infoP->depth < 1))
+        pm_error("We don't know how to interpret %u bitplanes file '%s'.  ",
+                 infoP->depth, infoP->name);
 }