Browse code

Fixed compile warnings specific for 64-bit architectures

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

Bogdan-Andrei Iancu authored on 12/12/2007 21:03:52
Showing 4 changed files
... ...
@@ -225,7 +225,7 @@ ResponseContentLength(TSession * const sessionP,
225 225
                       uint64_t   const len) {
226 226
     char contentLengthValue[32];
227 227
     
228
-    sprintf(contentLengthValue, "%llu", len);
228
+    sprintf(contentLengthValue, "%llu", (long long unsigned int)len);
229 229
 
230 230
     return ResponseAddField(sessionP, "Content-length", contentLengthValue);
231 231
 }
... ...
@@ -276,7 +276,7 @@ sendDirectoryDocument(TList *      const listP,
276 276
                 }
277 277
             }
278 278
                 
279
-            sprintf(z3, "%5llu %c", fi->size, u);
279
+            sprintf(z3, "%5llu %c", (long long unsigned int)fi->size, u);
280 280
             
281 281
             if (xmlrpc_streq(fi->name, ".."))
282 282
                 z4 = "";
... ...
@@ -441,8 +441,10 @@ sendBody(TSession *   const sessionP,
441 441
                     sprintf(z, "Content-type: %s" CRLF
442 442
                             "Content-range: bytes %llu-%llu/%llu" CRLF
443 443
                             "Content-length: %llu" CRLF
444
-                            CRLF, mediatype, start, end,
445
-                            filesize, end-start+1);
444
+                            CRLF, mediatype, (long long unsigned int)start,
445
+							(long long unsigned int)end,
446
+                            (long long unsigned int)filesize,
447
+							(long long unsigned int)(end-start+1));
446 448
 
447 449
                     ConnWrite(sessionP->conn, z, strlen(z));
448 450
 
... ...
@@ -508,7 +510,8 @@ ServerFileHandler(TSession * const r,
508 510
             break;
509 511
         }
510 512
         
511
-        sprintf(z, "bytes %llu-%llu/%llu", start, end, filesize);
513
+        sprintf(z, "bytes %llu-%llu/%llu", (long long unsigned int)start,
514
+			(long long unsigned int)end, (long long unsigned int)filesize);
512 515
 
513 516
         ResponseAddField(r, "Content-range", z);
514 517
         ResponseContentLength(r, end - start + 1);
... ...
@@ -235,7 +235,7 @@ socketWrite(TSocket *             const socketP,
235 235
                         "Socket closed.\n");
236 236
             else
237 237
                 fprintf(stderr, "Abyss socket: sent %u bytes: '%.*s'\n",
238
-                        -rc, -rc, &buffer[len-bytesLeft]);
238
+                        (unsigned int)-rc, (int)-rc, &buffer[len-bytesLeft]);
239 239
         }
240 240
         if (rc <= 0)
241 241
             /* 0 means connection closed; < 0 means severe error */
... ...
@@ -370,7 +370,7 @@ processCall(TSession *        const abyssSessionP,
370 370
     if (contentSize > xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID))
371 371
         xmlrpc_env_set_fault_formatted(
372 372
             &env, XMLRPC_LIMIT_EXCEEDED_ERROR,
373
-            "XML-RPC request too large (%d bytes)", contentSize);
373
+            "XML-RPC request too large (%ld bytes)", (long)contentSize);
374 374
     else {
375 375
         xmlrpc_mem_block *body=0;
376 376
         /* Read XML data off the wire. */