[trunk] another set of warnings fixes for LFS support
This commit is contained in:
parent
178309be47
commit
569bc02649
|
@ -35,19 +35,20 @@
|
|||
#include "ihdrbox_manager.h"
|
||||
#include "jpipstream_manager.h"
|
||||
#include "jp2k_encoder.h"
|
||||
#include "opj_inttypes.h"
|
||||
|
||||
void handle_JPIPstreamMSG( SOCKET connected_socket, cachelist_param_t *cachelist,
|
||||
Byte_t **jpipstream, int *streamlen, msgqueue_param_t *msgqueue)
|
||||
Byte_t **jpipstream, OPJ_SIZE_T *streamlen, msgqueue_param_t *msgqueue)
|
||||
{
|
||||
Byte_t *newjpipstream;
|
||||
int newstreamlen = 0;
|
||||
OPJ_SIZE_T newstreamlen = 0;
|
||||
cache_param_t *cache;
|
||||
char *target, *tid, *cid;
|
||||
metadatalist_param_t *metadatalist;
|
||||
|
||||
newjpipstream = receive_JPIPstream( connected_socket, &target, &tid, &cid, &newstreamlen);
|
||||
|
||||
fprintf( stderr, "newjpipstream length: %d\n", newstreamlen);
|
||||
fprintf( stderr, "newjpipstream length: %" PRIu64 "\n", newstreamlen);
|
||||
|
||||
parse_JPIPstream( newjpipstream, newstreamlen, *streamlen, msgqueue);
|
||||
|
||||
|
@ -144,7 +145,7 @@ void handle_TIDreqMSG( SOCKET connected_socket, cachelist_param_t *cachelist)
|
|||
{
|
||||
char *target, *tid = NULL;
|
||||
cache_param_t *cache;
|
||||
int tidlen = 0;
|
||||
OPJ_SIZE_T tidlen = 0;
|
||||
|
||||
target = receive_string( connected_socket);
|
||||
cache = search_cache( target, cachelist);
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
* @param[in,out] streamlen address of stream length
|
||||
* @param[in,out] msgqueue message queue pointer
|
||||
*/
|
||||
void handle_JPIPstreamMSG( SOCKET connected_socket, cachelist_param_t *cachelist, Byte_t **jpipstream, int *streamlen, msgqueue_param_t *msgqueue);
|
||||
void handle_JPIPstreamMSG( SOCKET connected_socket, cachelist_param_t *cachelist, Byte_t **jpipstream, OPJ_SIZE_T *streamlen, msgqueue_param_t *msgqueue);
|
||||
|
||||
/**
|
||||
* handle PNM request message
|
||||
|
|
|
@ -63,7 +63,7 @@ msgtype_t identify_clientmsg( SOCKET connected_socket)
|
|||
return MSGERROR;
|
||||
}
|
||||
|
||||
Byte_t * receive_JPIPstream( SOCKET connected_socket, char **target, char **tid, char **cid, int *streamlen)
|
||||
Byte_t * receive_JPIPstream( SOCKET connected_socket, char **target, char **tid, char **cid, OPJ_SIZE_T *streamlen)
|
||||
{
|
||||
char buf[BUF_LEN], versionstring[] = "version 1.2";
|
||||
int linelen, datalen;
|
||||
|
@ -134,7 +134,7 @@ void send_CIDstream( SOCKET connected_socket, char *cid, int cidlen)
|
|||
send_IDstream( connected_socket, cid, cidlen, "CID");
|
||||
}
|
||||
|
||||
void send_TIDstream( SOCKET connected_socket, char *tid, int tidlen)
|
||||
void send_TIDstream( SOCKET connected_socket, char *tid, OPJ_SIZE_T tidlen)
|
||||
{
|
||||
send_IDstream( connected_socket, tid, tidlen, "TID");
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ msgtype_t identify_clientmsg( SOCKET connected_socket);
|
|||
* @param [out] streamlen length of the received codestream
|
||||
* @return JPT- JPP- codestream
|
||||
*/
|
||||
Byte_t * receive_JPIPstream( SOCKET connected_socket, char **target, char **tid, char **cid, int *streamlen);
|
||||
Byte_t * receive_JPIPstream( SOCKET connected_socket, char **target, char **tid, char **cid, OPJ_SIZE_T *streamlen);
|
||||
|
||||
/**
|
||||
* send PGM/PPM image stream to the client
|
||||
|
@ -86,7 +86,7 @@ void send_XMLstream( SOCKET connected_socket, Byte_t *xmlstream, int length);
|
|||
* @param [in] tid tid string
|
||||
* @param [in] tidlen legnth of the tid string
|
||||
*/
|
||||
void send_TIDstream( SOCKET connected_socket, char *tid, int tidlen);
|
||||
void send_TIDstream( SOCKET connected_socket, char *tid, OPJ_SIZE_T tidlen);
|
||||
|
||||
/**
|
||||
* send CID data stream to the client
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "ihdrbox_manager.h"
|
||||
#include "j2kheader_manager.h"
|
||||
|
||||
Byte_t * update_JPIPstream( Byte_t *newstream, int newstreamlen, Byte_t *cache_stream, int *streamlen)
|
||||
Byte_t * update_JPIPstream( Byte_t *newstream, OPJ_SIZE_T newstreamlen, Byte_t *cache_stream, OPJ_SIZE_T *streamlen)
|
||||
{
|
||||
Byte_t *stream = (Byte_t *)malloc( (*streamlen)+newstreamlen);
|
||||
if( *streamlen > 0)
|
||||
|
@ -52,7 +52,7 @@ Byte_t * update_JPIPstream( Byte_t *newstream, int newstreamlen, Byte_t *cache_s
|
|||
return stream;
|
||||
}
|
||||
|
||||
void save_codestream( Byte_t *codestream, Byte8_t streamlen, const char *fmt)
|
||||
void save_codestream( Byte_t *codestream, OPJ_SIZE_T streamlen, const char *fmt)
|
||||
{
|
||||
time_t timer;
|
||||
struct tm *t_st;
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
#include "msgqueue_manager.h"
|
||||
#include "ihdrbox_manager.h"
|
||||
|
||||
Byte_t * update_JPIPstream( Byte_t *newstream, int newstreamlen, Byte_t *cache_stream, int *streamlen);
|
||||
Byte_t * update_JPIPstream( Byte_t *newstream, OPJ_SIZE_T newstreamlen, Byte_t *cache_stream, OPJ_SIZE_T *streamlen);
|
||||
|
||||
void save_codestream( Byte_t *codestream, Byte8_t streamlen, const char *fmt);
|
||||
void save_codestream( Byte_t *codestream, OPJ_SIZE_T streamlen, const char *fmt);
|
||||
|
||||
Byte_t * jpipstream_to_pnm( Byte_t *jpipstream, msgqueue_param_t *msgqueue, Byte8_t csn, int fw, int fh, ihdrbox_param_t **ihdrbox);
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ void insert_metadata_into_list( metadata_param_t *metabin, metadatalist_param_t
|
|||
void print_metadata( metadata_param_t *metadata)
|
||||
{
|
||||
boxcontents_param_t *boxcont;
|
||||
fprintf( logstream, "metadata-bin %d info:\n", metadata->idx);
|
||||
fprintf( logstream, "metadata-bin %" PRIu64 " info:\n", metadata->idx);
|
||||
print_allbox( metadata->boxlist);
|
||||
print_allplaceholder( metadata->placeholderlist);
|
||||
|
||||
|
|
|
@ -48,19 +48,19 @@ mhixbox_param_t * gene_mhixbox( box_param_t *box)
|
|||
{
|
||||
mhixbox_param_t *mhix;
|
||||
markeridx_param_t *mkridx, *lastmkidx;
|
||||
Byte8_t pos = 0;
|
||||
OPJ_OFF_T pos = 0;
|
||||
|
||||
mhix = ( mhixbox_param_t *)malloc( sizeof( mhixbox_param_t));
|
||||
|
||||
mhix->tlen = fetch_DBox8bytebigendian( box, (pos+=8)-8);
|
||||
|
||||
mhix->first = lastmkidx = NULL;
|
||||
while( pos < get_DBoxlen( box)){
|
||||
while( (OPJ_SIZE_T)pos < get_DBoxlen( box)){
|
||||
|
||||
mkridx = ( markeridx_param_t *)malloc( sizeof( markeridx_param_t));
|
||||
mkridx->code = fetch_DBox2bytebigendian( box, (pos+=2)-2);
|
||||
mkridx->num_remain = fetch_DBox2bytebigendian( box, (pos+=2)-2);
|
||||
mkridx->offset = fetch_DBox8bytebigendian( box, (pos+=8)-8);
|
||||
mkridx->offset = (OPJ_OFF_T)fetch_DBox8bytebigendian( box, (pos+=8)-8);
|
||||
mkridx->length = fetch_DBox2bytebigendian( box, (pos+=2)-2);
|
||||
mkridx->next = NULL;
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ void send_responsedata( server_record_t *rec, QR_t *qr)
|
|||
|
||||
add_EORmsg( fd, qr); /* needed at least for tcp and udp */
|
||||
|
||||
len_of_jpipstream = get_filesize( fd);
|
||||
len_of_jpipstream = (Byte8_t)get_filesize( fd);
|
||||
jpipstream = fetch_bytes( fd, 0, len_of_jpipstream);
|
||||
|
||||
close( fd);
|
||||
|
@ -217,7 +217,7 @@ dec_server_record_t * init_dec_server( int port)
|
|||
record->jpipstream = NULL;
|
||||
record->jpipstreamlen = 0;
|
||||
record->msgqueue = gene_msgqueue( true, NULL);
|
||||
record->listening_socket = open_listeningsocket( port);
|
||||
record->listening_socket = open_listeningsocket( (uint16_t)port);
|
||||
|
||||
return record;
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ bool fread_jpip( char fname[], jpip_dec_param_t *dec)
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!(dec->jpiplen = get_filesize(infd)))
|
||||
if(!(dec->jpiplen = (Byte8_t)get_filesize(infd)))
|
||||
return false;
|
||||
|
||||
dec->jpipstream = (Byte_t *)malloc( dec->jpiplen);
|
||||
|
|
|
@ -157,7 +157,7 @@ void local_log( bool query, bool messages, bool sessions, bool targets, QR_t *qr
|
|||
typedef struct dec_server_record{
|
||||
cachelist_param_t *cachelist; /**< cache list*/
|
||||
Byte_t *jpipstream; /**< JPT/JPP stream*/
|
||||
int jpipstreamlen; /**< length of jpipstream*/
|
||||
OPJ_SIZE_T jpipstreamlen; /**< length of jpipstream*/
|
||||
msgqueue_param_t *msgqueue; /**< parsed message queue of jpipstream*/
|
||||
SOCKET listening_socket; /**< listenning socket*/
|
||||
} dec_server_record_t;
|
||||
|
|
|
@ -97,7 +97,7 @@ SOCKET accept_socket( SOCKET listening_socket)
|
|||
return accept( listening_socket, (struct sockaddr *)&peer_sin, &addrlen);
|
||||
}
|
||||
|
||||
void send_stream( SOCKET connected_socket, void *stream, OPJ_SIZE_T length)
|
||||
void send_stream( SOCKET connected_socket, const void *stream, OPJ_SIZE_T length)
|
||||
{
|
||||
char *ptr = (char*)stream;
|
||||
OPJ_SIZE_T remlen = length;
|
||||
|
|
|
@ -93,7 +93,7 @@ void * receive_stream( SOCKET connected_socket, OPJ_SIZE_T length);
|
|||
* @param [in] stream data stream
|
||||
* @param [in] length length of data stream
|
||||
*/
|
||||
void send_stream( SOCKET connected_socket, void *stream, OPJ_SIZE_T length);
|
||||
void send_stream( SOCKET connected_socket, const void *stream, OPJ_SIZE_T length);
|
||||
|
||||
/**
|
||||
* close socket
|
||||
|
|
Loading…
Reference in New Issue