Closed tachimarten closed 1 year ago
This pull request fixes 2 alerts when merging f141b4192f98ac2b8ddd4923f85caaf8c6a441f4 into 1c235e7308768bfc5c6a018f5990d976072dce19 - view on LGTM.com
fixed alerts:
I found one other bug; let me fix before merging.
OK, this should work now. Should be ready to merge.
This pull request fixes 2 alerts when merging c176a8cc9114a21b0416ff44cfb61812e03865bd into 1c235e7308768bfc5c6a018f5990d976072dce19 - view on LGTM.com
fixed alerts:
This pull request fixes 2 alerts when merging 3439d3784bf28546ccfd04eaeb41b4f86f634644 into 1c235e7308768bfc5c6a018f5990d976072dce19 - view on LGTM.com
fixed alerts:
Hi @tachimarten ,
is it possible for you to fix this warning?
core/../bupboop/coretone/music.c: In function 'ct_instr_setup': core/../bupboop/coretone/music.c:67:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 67 | uiY = (uint32_t)pInstrPak; | ^ core/../bupboop/coretone/sample.c: In function 'ct_sample_setup': core/../bupboop/coretone/sample.c:133:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 133 | uiY = (uint32_t)pSamplePak; | ^
Some other warnings here which would be nice to fix -
core/../bupboop/coretone/channel.c: In function 'ct_channel_render': core/../bupboop/coretone/channel.c:53:9: warning: enumeration value 'eCHANNEL_MODE_OFF' not handled in switch [-Wswitch] 53 | switch(pChannel->eMode) | ^
~core/../bupboop/coretone/channel.c:53:9: warning: enumeration value 'eCHANNEL_MODE_FOOTER' not handled in switch [-Wswitch]
Another issue I found but which I will be fixing myself - don't do for loop initial declarations. This breaks C89 builds, and some of our platforms depend on it. Always declare variables either at the start of a function or the start of a code block.
Also, please do not use stdbool.h in the future. This kills off backwards compatibility. If you absolutely have to use the bool type, use the libretro-common provided header file boolean.h instead.
There were numerous variables that were not declared either at the start of a code block or function, breaking C89 builds. Next time try compiling with -std=c89 (preferably add pedantic to it) so that you can catch some of these issues.
This pull request builds upon #71 in these two ways: