emmebrusa / TSDZ2-Smart-EBike-1

TSDZ2 Open Source Firmware adapted to VLCD5-VLCD6-XH18 displays
GNU General Public License v3.0
131 stars 35 forks source link

Fix compiler warning for missing void in function prototypes (#72) #75

Closed chgpalmer closed 7 months ago

chgpalmer commented 10 months ago

Building firmware no longer outputs warnings as per #72

sdcc: Calling assembler...
sdcc: sdasstm8 -plosgffwy "../../bin/timers.asm"
sdcc --verbose -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-ihx --debug  -o../../bin/ ebike_app.c
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -std=c99 -I../common/STM8S_StdPeriph_Lib/inc -I../common -DSTM8S105 -Ddouble=float --obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_CHAR_UNSIGNED -D__SDCC_MODEL_MEDIUM -D__SDCC_OPTIMIZE_SPEED -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCCCALL=1 -D__SDCC=4_3_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=3 -D__SDCC_VERSION_PATCH=0 -D__SDCC_REVISION=14184 -D__SDCC_stm8 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__SIZEOF_FLOAT__=4 -D__SIZEOF_DOUBLE__=4 -D__SDCC_BITINT_MAXWIDTH=64 -isystem /opt/homebrew/bin/../share/sdcc/include/stm8 -isystem /opt/homebrew/Cellar/sdcc/4.3.0/share/sdcc/include/stm8 -isystem /opt/homebrew/bin/../share/sdcc/include -isystem /opt/homebrew/Cellar/sdcc/4.3.0/share/sdcc/include  -xc ebike_app.c 
sdcc: Generating code...
sdcc: Calling assembler...
sdcc: sdasstm8 -plosgffwy "../../bin/ebike_app.asm"
dzid26 commented 10 months ago

Maybe you could bump sdcc version in the CI to the latest that causes the warnings? https://github.com/emmebrusa/TSDZ2-Smart-EBike-1/blob/9f22efbac8baab6c2644afe1cefad0974b1be647/.github/workflows/build.yaml#L18

I don't know if there is a way to always point to the latest...

chgpalmer commented 10 months ago

Added commit that bumps SDCC version to 4.3.0, which is both the most recent release and what I am using via mac homebrew

chgpalmer commented 10 months ago

The github build workflow fails using 4.3.0 on Windows so I've removed the version update commit Build now passes again: https://github.com/chgpalmer/TSDZ2-Smart-EBike-1/actions/runs/5979860875

Which compiler we use doesn't affect the validity of this patch. A new issue could be raised to increment the SDCC version

dzid26 commented 10 months ago

https://github.com/chgpalmer/TSDZ2-Smart-EBike-1/actions/runs/5979789568 Interesting. I actually had some issues when I updated to 4.3.0 on Windows. It seemed like CC1 was used instead of SDCC, but I am not sure.

I don't think I am going to investigate this, but I created a vague issue for this https://github.com/emmebrusa/TSDZ2-Smart-EBike-1/issues/76