summaryrefslogtreecommitdiff
path: root/src/bin/jp2
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2015-10-29 09:12:03 +0100
committermayeut <mayeut@users.noreply.github.com>2015-11-01 16:53:55 +0100
commit4ac509182a00de635e814372ba813851062bedb3 (patch)
treede09e8266e71eced3d6f64bd212837b9f98cfa5c /src/bin/jp2
parent0ae66e891a92b999774704ac3f4d074bd49d9e9a (diff)
convert: Remove unneeded type casts
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'src/bin/jp2')
-rw-r--r--src/bin/jp2/convert.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c
index d3f2c388..e3af7ee3 100644
--- a/src/bin/jp2/convert.c
+++ b/src/bin/jp2/convert.c
@@ -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;