Browse code

fixed 64-bits warnings

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@1583 689a6050-402a-0410-94f2-e92a70836424

Bogdan-Andrei Iancu authored on 06/02/2007 09:55:30
Showing 5 changed files
... ...
@@ -210,7 +210,7 @@ int encode_header(struct sip_msg *sipmsg,struct hdr_field *hdr,unsigned char *pa
210 210
 	       goto error;
211 211
 	    }
212 212
 	 }
213
-	 if((len=encode_content_type(hdr->name.s,hdr->len,(unsigned int)hdr->parsed,(char*)&payload[4]))<0){
213
+	 if((len=encode_content_type(hdr->name.s,hdr->len,(unsigned int)(unsigned long)hdr->parsed,(char*)&payload[4]))<0){
214 214
 	    myerror="ERROR: encode_header: encoding via header\n";
215 215
 	    goto error;
216 216
 	 }else{
... ...
@@ -322,12 +322,12 @@ int print_uri_junit_tests(char *hdrstart,int hdrlen,unsigned char *payload,int p
322 322
       dprintf(fd,"%sgetParameter=(SAVP)",prefix);/*SVP = Attribute Value Pair*/
323 323
       for(k=0;k<=m;k++){
324 324
 	 if((aux3[k]==';'||(k==m)) && aux2==NULL){/*no parameterValue was found*/
325
-	    dprintf(fd,"%.*s=;",aux3-aux+k,aux);
325
+	    dprintf(fd,"%.*s=;",(int)(aux3-aux+k),aux);
326 326
 	    aux2=NULL;/*resets the parameterValue-start pointer*/
327 327
 	    aux=aux3+1+k;/*points to the next parameter*/
328 328
 	 }else 
329 329
 	    if((aux3[k]==';'||(k==m)) && aux2!=NULL){
330
-	       dprintf(fd,"%.*s=%.*s;",aux2-aux,aux,aux3-aux2-1+k,aux2+1);
330
+	       dprintf(fd,"%.*s=%.*s;",(int)(aux2-aux),aux,(int)(aux3-aux2-1+k),aux2+1);
331 331
 	       aux2=NULL;
332 332
 	       aux=aux3+1+k;
333 333
 	    } else 
... ...
@@ -346,12 +346,12 @@ int print_uri_junit_tests(char *hdrstart,int hdrlen,unsigned char *payload,int p
346 346
       dprintf(fd,"%sgetHeader=(SAVP)",prefix);
347 347
       for(k=0;k<=m;k++){
348 348
 	 if((aux3[k]==';'||(k==m)) && aux2==NULL){/*no parameterValue was found*/
349
-	    dprintf(fd,"%.*s=;",aux3-aux+k,aux);
349
+	    dprintf(fd,"%.*s=;",(int)(aux3-aux+k),aux);
350 350
 	    aux2=NULL;/*resets the parameterValue-start pointer*/
351 351
 	    aux=aux3+1+k;/*points to the next parameter*/
352 352
 	 }else 
353 353
 	    if((aux3[k]==';'||(k==m)) && aux2!=NULL){
354
-	       dprintf(fd,"%.*s=%.*s;",aux2-aux,aux,aux3-aux2-1+k,aux2+1);
354
+	       dprintf(fd,"%.*s=%.*s;",(int)(aux2-aux),aux,(int)(aux3-aux2-1+k),aux2+1);
355 355
 	       aux2=NULL;
356 356
 	       aux=aux3+1+k;
357 357
 	    } else 
... ...
@@ -307,9 +307,9 @@ inline int init_pingtable(struct ha *table,int timeout,int maxpings)
307 307
       goto error;
308 308
    }else 
309 309
       lock_init(table->mutex);
310
-   LOG(L_ERR,"alloc'ing %d bytes for %d pings\n",(maxpings*sizeof(struct ping)),maxpings);
310
+   LOG(L_ERR,"alloc'ing %d bytes for %d pings\n",(int)(maxpings*sizeof(struct ping)),maxpings);
311 311
    if (0==(table->pings=shm_malloc(maxpings*sizeof(struct ping)))){
312
-      LOG(L_ERR,"Unable to shm_malloc %d bytes for %d pings\n",(maxpings*sizeof(struct ping)),maxpings);
312
+      LOG(L_ERR,"Unable to shm_malloc %d bytes for %d pings\n",(int)(maxpings*sizeof(struct ping)),maxpings);
313 313
       goto error;
314 314
    }else{
315 315
       memset(table->pings,0,(maxpings*sizeof(struct ping)));
... ...
@@ -1219,7 +1219,8 @@ int extract_allowed_headers(struct sip_msg *my_msg,int strip_top_vias,int allow_
1219 1219
 	    while(strip_top_vias--)
1220 1220
 	       vb=vb->next;
1221 1221
 	    k= (hf->name.s + hf->len) - vb->name.s;
1222
-	    LOG(L_DBG,"Stripping vias [%.*s]\n",vb->name.s-hf->name.s,hf->name.s);
1222
+	    LOG(L_DBG,"Stripping vias [%.*s]\n",(int)(vb->name.s-hf->name.s),
1223
+			hf->name.s);
1223 1224
 	    if(k+VIA_LEN<headers_len){
1224 1225
 	       memcpy(headers+len,VIA,VIA_LEN);
1225 1226
 	       len+=VIA_LEN;
... ...
@@ -44,7 +44,7 @@ struct statstable* init_seas_stats_table()
44 44
    /*allocs the table*/
45 45
    seas_stats_table= (struct statstable*)shm_malloc( sizeof( struct statstable ) );
46 46
    if (!seas_stats_table) {
47
-      LOG(L_ERR, "ERROR:init_seas_stats_table: no shmem for stats table (%d bytes)\n",sizeof(struct statstable));
47
+      LOG(L_ERR, "ERROR:init_seas_stats_table: no shmem for stats table (%d bytes)\n",(int)sizeof(struct statstable));
48 48
       return 0;
49 49
    }
50 50
    memset(seas_stats_table, 0, sizeof(struct statstable) );