]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/picomodel/lwo/lwo2.c
q3map2 is now waring free
[xonotic/netradiant.git] / libs / picomodel / lwo / lwo2.c
index ff83d5c22bbbfa955e516adf333c48c50cb7ba30..56c756c325d62302ea700d922999bf7ca05e28c9 100644 (file)
@@ -76,13 +76,13 @@ can be used to diagnose the cause.
 If you don't need this information, failID and failpos can be NULL.
 ====================================================================== */
 
-lwObject *lwGetObject( char *filename, picoMemStream_t *fp, unsigned int *failID, int *failpos )
+lwObject *lwGetObject( const char *filename, picoMemStream_t *fp, unsigned int *failID, int *failpos )
 {
    lwObject *object;
    lwLayer *layer;
    lwNode *node;
-   unsigned int id, formsize, type, cksize;
-   int i, rlen;
+   unsigned int id, formsize, type;
+   int i, rlen, cksize;
 
    /* open the file */
 
@@ -233,7 +233,7 @@ lwObject *lwGetObject( char *filename, picoMemStream_t *fp, unsigned int *failID
 
       /* end of the file? */
 
-      if ( formsize <= _pico_memstream_tell( fp ) - 8 ) break;
+      if ( formsize <= (unsigned int) (_pico_memstream_tell( fp ) - 8) ) break;
 
       /* get the next chunk header */
 
@@ -270,7 +270,7 @@ Fail:
    return NULL;
 }
 
-int lwValidateObject( char *filename, picoMemStream_t *fp, unsigned int *failID, int *failpos )
+int lwValidateObject( const char *filename, picoMemStream_t *fp, unsigned int *failID, int *failpos )
 {
    unsigned int id, formsize, type;