Hi Mikko,
thanks for the reply. These warnings are the ones that I think could be critical, but there are a lot more regarding unused variables and use o uninitialized variables...
Any way, thanks for promptly response.
Best Regards,
José Torres.
Hi Mikko,
I am using gcc GNU Tools for STM32, version 7-2018-q2-update, with the following flags:
-mcpu=cortex-m4 -std=gnu11 -g3 -Og -ffunction-sections -fdata-sections -Wall -Wextra -fstack-usage --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb.
However, I have used also gcc from cygwin on Windows 10 and get the warnings too.
Regards,
José Torres
Have you got the latest version from Github? We are also using Cygwin, but I just realized that we are not using malloc with it (DLMS_IGNORE_MALLOC). We'll check this with the malloc to see if we can get more errors.
After update to the latest version from GitHub, I got the following warnings when compiling for STM32:
gurux/src/dlms.c:1532:9: warning: unused parameter 'len' [-Wunused-parameter]
gurux/src/dlms.c:1706:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/dlms.c:4239:19: warning: unused parameter 'first' [-Wunused-parameter]
gurux/src/dlms.c:2474:12: warning: 'len' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxarray.c:226:74: warning: unused parameter 'itemSize' [-Wunused-parameter]
gurux/src/gxget.c:819:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxinvoke.c:1607:25: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxget.c:4890:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxget.c:4894:19: warning: unused parameter 'appendAA' [-Wunused-parameter]
gurux/src/gxget.c:807:20: warning: 'pduSize' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxget.c:1139:18: warning: 'pduSize' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxget.c:2250:18: warning: 'pduSize' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxget.c:2385:20: warning: 'pduSize' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxset.c:7552:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:7576:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:7607:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:7646:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:7703:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:8093:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:8127:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux\include\gxmem.h:48:30: warning: 'ipcpItem' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxset.c:4534:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxset.c:4992:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/helpers.c:708:26: warning: unused parameter 'scaler' [-Wunused-parameter]
gurux/src/notify.c:364:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
gurux/src/server.c:3248:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
gurux/src/serverevents.c:34:34: warning: unused parameter 'str' [-Wunused-parameter]
gurux/src/serverevents.c:34:43: warning: unused parameter 'err' [-Wunused-parameter]
gurux/src/serverevents.c:50:35: warning: unused parameter 'str' [-Wunused-parameter]
gurux/src/serverevents.c:50:52: warning: unused parameter 'ot' [-Wunused-parameter]
gurux/src/serverevents.c:50:77: warning: unused parameter 'ln' [-Wunused-parameter]
gurux/src/serverevents.c:50:85: warning: unused parameter 'err' [-Wunused-parameter]
gurux/src/variant.c:389:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
gurux/src/variant.c:824:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
Hi Torres,
Hi Torres,
Thank you for this info. Those warnings are now fixed. We try to make a new release tomorrow.
BR,
Mikko
Hi Mikko,
Hi Mikko,
thanks for the reply. These warnings are the ones that I think could be critical, but there are a lot more regarding unused variables and use o uninitialized variables...
Any way, thanks for promptly response.
Best Regards,
José Torres.
Hi,
Hi,
What compiler you are using?
BR,
Mikko
Hi Mikko,
Hi Mikko,
I am using gcc GNU Tools for STM32, version 7-2018-q2-update, with the following flags:
-mcpu=cortex-m4 -std=gnu11 -g3 -Og -ffunction-sections -fdata-sections -Wall -Wextra -fstack-usage --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb.
However, I have used also gcc from cygwin on Windows 10 and get the warnings too.
Regards,
José Torres
Hi José,
Hi José,
Have you got the latest version from Github? We are also using Cygwin, but I just realized that we are not using malloc with it (DLMS_IGNORE_MALLOC). We'll check this with the malloc to see if we can get more errors.
BR,
Mikko
Hi Mikko,
Hi Mikko,
After update to the latest version from GitHub, I got the following warnings when compiling for STM32:
gurux/src/dlms.c:1532:9: warning: unused parameter 'len' [-Wunused-parameter]
gurux/src/dlms.c:1706:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/dlms.c:4239:19: warning: unused parameter 'first' [-Wunused-parameter]
gurux/src/dlms.c:2474:12: warning: 'len' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxarray.c:226:74: warning: unused parameter 'itemSize' [-Wunused-parameter]
gurux/src/gxget.c:819:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxinvoke.c:1607:25: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxget.c:4890:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxget.c:4894:19: warning: unused parameter 'appendAA' [-Wunused-parameter]
gurux/src/gxget.c:807:20: warning: 'pduSize' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxget.c:1139:18: warning: 'pduSize' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxget.c:2250:18: warning: 'pduSize' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxget.c:2385:20: warning: 'pduSize' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxset.c:7552:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:7576:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:7607:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:7646:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:7703:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:8093:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux/src/gxset.c:8127:19: warning: unused parameter 'settings' [-Wunused-parameter]
gurux\include\gxmem.h:48:30: warning: 'ipcpItem' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxset.c:4534:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/gxset.c:4992:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
gurux/src/helpers.c:708:26: warning: unused parameter 'scaler' [-Wunused-parameter]
gurux/src/notify.c:364:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
gurux/src/server.c:3248:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
gurux/src/serverevents.c:34:34: warning: unused parameter 'str' [-Wunused-parameter]
gurux/src/serverevents.c:34:43: warning: unused parameter 'err' [-Wunused-parameter]
gurux/src/serverevents.c:50:35: warning: unused parameter 'str' [-Wunused-parameter]
gurux/src/serverevents.c:50:52: warning: unused parameter 'ot' [-Wunused-parameter]
gurux/src/serverevents.c:50:77: warning: unused parameter 'ln' [-Wunused-parameter]
gurux/src/serverevents.c:50:85: warning: unused parameter 'err' [-Wunused-parameter]
gurux/src/variant.c:389:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
gurux/src/variant.c:824:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
Regards,
José Torres
Hi,
Hi,
Thank you very much for this info. We'll fix those warnings in next week. I believe that must make toolchain for STM32.
BR,
Mikko
Hi Mikko,
Hi Mikko,
no problem, thanks for reply. I am looking forward for the next update.
Best Regards,
José Torres