hello
I'm using MQX 4.2.0.2 run on FRDM-K64F.
And build MQX using KDS3.0
I import the below 4 original MQX project into KDS,
and build them in release mode as the following.
・bsp_frdmk64f
・psp_frdmk64f
・rtcs_frdmk64f
・shell_frdmk64f
build log of [bsp_frdmk64f] and [psp_frdmk64f] is well.
But [rtcs_frdmk64f] and [shell_frdmk64f] have some warning.
Details are as follows.
[rtcs_frdmk64f] build warning log:
-----------------------------------------------------------------------------------------------------------------
..\..\..\..\source\nat\dnat.c: In function 'DNAT_lookup_rule':
..\..\..\..\source\nat\dnat.c:92:75: warning: 'destination_port' may be used uninitialized in this function [-Wmaybe-uninitialized]
if ((destination_port >= element_ptr->RULE.PUBLIC_START_PORT) &&
^
..\..\..\..\source\nat\dnat.c:98:71: warning: 'source_port' may be used uninitialized in this function [-Wmaybe-uninitialized]
(source_port >= element_ptr->RULE.PRIVATE_START_PORT) &&
^
..\..\..\..\source\nat\natevent.c: In function 'NAT_expire':
..\..\..\..\source\nat\natevent.c:176:48: warning: 'tmp_nat_event_ptr' may be used uninitialized in this function [-Wmaybe-uninitialized]
tcpip_event_ptr->TIME = tmp_nat_event_ptr->TIME;
^
..\..\..\..\source\nat\natdata.c: In function 'NAT_insert':
..\..\..\..\source\nat\natdata.c:230:18: warning: 'key' may be used uninitialized in this function [-Wmaybe-uninitialized]
IPRADIX_insert(&nat_cfg_ptr->ROOT_IN, key, 0xFFFFFFFF, nat_cfg_ptr->RADIX_IN,
^
..\..\..\..\source\if\rtcsrand.c: In function 'kiss_gen_seed':
..\..\..\..\source\if\rtcsrand.c:64:17: warning: type of 'x' defaults to 'int' [enabled by default]
static uint32_t kiss_gen_seed(x, y)
^
..\..\..\..\source\if\rtcsrand.c:64:17: warning: type of 'y' defaults to 'int' [enabled by default]
..\..\..\..\source\nat\nat_apply.c: In function 'NAT_mod_ip':
..\..\..\..\source\nat\nat_apply.c:367:28: warning: unused variable 'nat_cfg_ptr' [-Wunused-variable]
NAT_CFG_STRUCT_PTR nat_cfg_ptr = RTCS_getcfg(NAT);
^
..\..\..\..\source\nat\nat_apply.c: In function 'NAT_mod_icmp':
..\..\..\..\source\nat\nat_apply.c:649:63: warning: value computed is not used [-Wunused-value]
mqx_htons(transport.ECHO_PTR->SEQ, nat_session_ptr->PRV_PORT);
^
..\..\..\..\source\nat\nat_apply.c:653:63: warning: value computed is not used [-Wunused-value]
mqx_htons(transport.ECHO_PTR->SEQ, nat_session_ptr->NAT_PORT);
^
-----------------------------------------------------------------------------------------------------------------
[shell_frdmk64f] build warning log:
-----------------------------------------------------------------------------------------------------------------
..\..\..\..\source\rtcs\sh_ppp.c: In function 'sh_ppp_start':
\freescale_mqx_4_2\shell\source\include\sh_rtcs.h:92:19: warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]
do {fprintf( _file, "%s"_format "%s", PPP_PRINT_PREFIX, ##__VA_ARGS__, "\n" );} while( 0 )
^
..\..\..\..\source\rtcs\sh_ppp.c:245:24: note: 'error' was declared here
uint32_t error;
^
-----------------------------------------------------------------------------------------------------------------
Should I ignore these warnings or fix them?
If need to fix, can someone provide an official(NXP) amendment?
Thanks.
Does someone have same experience about this issue?
Hi Bing:
I did a quick check of the release version with KDS 3.2 and eth_to serial demo
C:\Freescale\Freescale_MQX_4_2\rtcs\examples\eth_to_serial\build\kds\eth_to_serial_frdmk64f
Not found this issue. Could you please update your KDS to 3.2 and try it again?
Regards
Daniel
Hi Daniel
I have checked my KDS's version.
I wrote wrong version number of KDS.
Right version is below.
Kinetis Design Studio
Version: 3.2.0
That's same with your KDS.
Hi Daniel
Thanks for your reply.
I forget some build conditions.
Must to enable the defines below in RTCS.
#define RTCSCFG_ENABLE_NAT 1
#define RTCSCFG_ENABLE_PPP 1
#define RTCSCFG_ENABLE_VIRTUAL_ROUTES 1
#define RTCSCFG_USE_KISS_RNG 1
and warings will be appear.
I think the upper defines are disable in eth_to_serial_frdmk64f project.
Could you enable these defines in eth_to_serial_frdmk64f?
Thanks.