From 753a1468bc5eb3064d16f6d6f77a5c4d90913b26 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 9 Jan 2020 08:56:36 -0500 Subject: [PATCH] Fix #128: Do not directly use a literal for char* members Instead of directly using a literal, declare a static `char[]` variable with the string and use that instead. --- fsw/pc-rtems/src/cfe_psp_start.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fsw/pc-rtems/src/cfe_psp_start.c b/fsw/pc-rtems/src/cfe_psp_start.c index e4069794..4fd1395a 100644 --- a/fsw/pc-rtems/src/cfe_psp_start.c +++ b/fsw/pc-rtems/src/cfe_psp_start.c @@ -105,13 +105,16 @@ rtems_driver_address_table rtems_ramdisk_io_ops = rtems_id RtemsTimerId; static unsigned char ethernet_address[6] = {0x00, 0x04, 0x9F, 0x00, 0x27, 0x61 }; +static char net_name_str[] = "fxp1"; +static char ip_addr_str[] = "10.0.2.17"; +static char ip_netmask_str[] = "255.255.255.0"; static struct rtems_bsdnet_ifconfig netdriver_config = { - .name = "fxp1" /*RTEMS_BSP_NETWORK_DRIVER_NAME*/, - .attach = rtems_fxp_attach /*RTEMS_BSP_NETWORK_DRIVER_ATTACH*/, + .name = net_name_str, + .attach = rtems_fxp_attach, .next = NULL, - .ip_address = "10.0.2.17", - .ip_netmask = "255.255.255.0", + .ip_address = ip_addr_str, + .ip_netmask = ip_netmask_str, .hardware_address = ethernet_address /* more options can follow */ };