thumbs.c: warning fixes
[blender.git] / source / blender / src / filelist.c
index 95bce704d3c70df12be32770a090acd41ddfff7d..23a5e73f7cdc4c63dedb6f3ccb0a16e76d4d829c 100644 (file)
@@ -265,9 +265,7 @@ static int compare_extension(const void *a1, const void *a2) {
 
 void BIF_filelist_filter(FileList* filelist)
 {
-       int num_files = 0;
        int num_filtered = 0;
-       struct direntry *old_filelist;
        int i, j;
 
        if (!filelist->filelist)
@@ -483,7 +481,7 @@ void BIF_filelist_loadimage(struct FileList* filelist, int index)
                                        scaledy =  ( (float)imb->y/(float)imb->x )*imgwidth;
                                }
                                else {
-                                       scaledy = imgheight;
+                                       scaledy = (float)imgheight;
                                        scaledx =  ( (float)imb->x/(float)imb->y )*imgheight;
                                }
                                ex = (short)scaledx;
@@ -561,7 +559,7 @@ int BIF_filelist_find(struct FileList* filelist, char *file)
        int fidx = -1;
        
        if (!filelist->fidx) 
-               return;
+               return fidx;
 
        
        for (i = 0; i < filelist->numfiles; ++i) {