[trunk] fix another simple warning

This commit is contained in:
Mathieu Malaterre 2012-03-26 13:15:40 +00:00
parent 86ed364dc0
commit 34b4ec3624
1 changed files with 5 additions and 1 deletions

View File

@ -30,6 +30,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h>
#include "ihdrbox_manager.h" #include "ihdrbox_manager.h"
ihdrbox_param_t * gene_ihdrbox( metadatalist_param_t *metadatalist, Byte_t *jpipstream) ihdrbox_param_t * gene_ihdrbox( metadatalist_param_t *metadatalist, Byte_t *jpipstream)
@ -37,6 +38,7 @@ ihdrbox_param_t * gene_ihdrbox( metadatalist_param_t *metadatalist, Byte_t *jpip
ihdrbox_param_t *ihdrbox; ihdrbox_param_t *ihdrbox;
metadata_param_t *meta; metadata_param_t *meta;
box_param_t *jp2h, *ihdr; box_param_t *jp2h, *ihdr;
int bpc_val;
jp2h = NULL; jp2h = NULL;
meta = metadatalist->first; meta = metadatalist->first;
@ -65,7 +67,9 @@ ihdrbox_param_t * gene_ihdrbox( metadatalist_param_t *metadatalist, Byte_t *jpip
ihdrbox->height = big4( jpipstream+get_DBoxoff(ihdr)); ihdrbox->height = big4( jpipstream+get_DBoxoff(ihdr));
ihdrbox->width = big4( jpipstream+get_DBoxoff(ihdr)+4); ihdrbox->width = big4( jpipstream+get_DBoxoff(ihdr)+4);
ihdrbox->nc = big2( jpipstream+get_DBoxoff(ihdr)+8); ihdrbox->nc = big2( jpipstream+get_DBoxoff(ihdr)+8);
ihdrbox->bpc = *(jpipstream+get_DBoxoff(ihdr)+10)+1; bpc_val = *(jpipstream+get_DBoxoff(ihdr)+10)+1;
assert( bpc_val >= 0 && bpc_val <= 255 );
ihdrbox->bpc = (Byte_t)bpc_val;
free( ihdr); free( ihdr);