[hatari-devel] LLVM static analyzer output

Nicolas Pomarède npomarede at corp.free.fr
Sun May 22 18:42:04 CEST 2011


Here're the results from gcc 4.6 :

uae-cpu/build68k.c: In function 'main':
uae-cpu/build68k.c:83:7: attention : variable 'patbits' set but not used 
[-Wunused-but-set-variable]

uae-cpu/fpp.c: In function 'restore_fpu':
uae-cpu/fpp.c:1358:9: attention : variable 'model' set but not used 
[-Wunused-but-set-variable]

-> uae's specific ; leave it this way

debug/debugui.c: In function 'DebugUI_SetOptions':
debug/debugui.c:344:32: attention : to be safe all intermediate pointers 
in cast from 'char **' to 'const char **' must be 'const' qualified 
[-Wcast-qual]

cfgopts.c: In function 'update_config':
cfgopts.c:280:21: attention : variable 'next' set but not used 
[-Wunused-but-set-variable]

-> don't store the result of strtok ?

file.c: In function 'File_Open':
file.c:524:14: attention : variable 'rd' set but not used 
[-Wunused-but-set-variable]
file.c:524:6: attention : variable 'wr' set but not used 
[-Wunused-but-set-variable]

-> only used in assert ; any way to remove the warning ?

ide.c: In function 'ide_atapi_cmd':
ide.c:1754:20: attention : variable 'start_track' set but not used 
[-Wunused-but-set-variable]
ide.c:1754:15: attention : variable 'msf' set but not used 
[-Wunused-but-set-variable]

main.c: In function 'main':
main.c:739:33: attention : to be safe all intermediate pointers in cast 
from 'char **' to 'const char **' must be 'const' qualified [-Wcast-qual]


In file included from screen.c:1266:0:
convert/med640x16_spec.c: In function 
'Line_ConvertMediumRes_640x16Bit_Spec':
convert/med640x16_spec.c:41:19: attention : variable 'edx' set but not 
used [-Wunused-but-set-variable]
In file included from screen.c:1273:0:
convert/med640x32_spec.c: In function 
'Line_ConvertMediumRes_640x32Bit_Spec':
convert/med640x32_spec.c:41:19: attention : variable 'edx' set but not 
used [-Wunused-but-set-variable]

-> leave it this way to keep the same logic in all convert/*c files

video.c: In function 'Video_DrawScreen':
video.c:2526:7: attention : variable 'bScreenChanged' set but not used 
[-Wunused-but-set-variable]

-> we don't use the return result of the functions ; remove 
bScreenChanged ?


Nicolas



More information about the hatari-devel mailing list