]> granicus.if.org Git - openjpeg/commitdiff
convert: Remove unneeded type casts
authorStefan Weil <sw@weilnetz.de>
Thu, 29 Oct 2015 08:12:03 +0000 (09:12 +0100)
committermayeut <mayeut@users.noreply.github.com>
Sun, 1 Nov 2015 15:53:55 +0000 (16:53 +0100)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
src/bin/jp2/convert.c

index d3f2c38878a1b494ee93c184706130582e94d447..e3af7ee383f6b73f1560bc713738384ce7d6da40 100644 (file)
@@ -588,12 +588,12 @@ static int tga_readheader(FILE *fp, unsigned int *bits_per_pixel,
         fprintf(stderr, "\nError: fread return a number of element different from the expected.\n");
         return 0 ;
     }
-    id_len = (unsigned char)tga[0];
-    /*cmap_type = (unsigned char)tga[1];*/
-    image_type = (unsigned char)tga[2];
+    id_len = tga[0];
+    /*cmap_type = tga[1];*/
+    image_type = tga[2];
     /*cmap_index = get_ushort(*(unsigned short*)(&tga[3]));*/
     cmap_len = get_ushort(*(unsigned short*)(&tga[5]));
-    cmap_entry_size = (unsigned char)tga[7];
+    cmap_entry_size = tga[7];
 
 
 #if 0
@@ -602,8 +602,8 @@ static int tga_readheader(FILE *fp, unsigned int *bits_per_pixel,
 #endif
     image_w = get_ushort(*(unsigned short*)(&tga[12]));
     image_h = get_ushort(*(unsigned short*)(&tga[14]));
-    pixel_depth = (unsigned char)tga[16];
-    image_desc  = (unsigned char)tga[17];
+    pixel_depth = tga[16];
+    image_desc  = tga[17];
 
     *bits_per_pixel = (unsigned int)pixel_depth;
     *width  = (unsigned int)image_w;