From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Tue, 12 Jan 2016 17:45:24 +0800 Subject: [U-Boot] [PATCH] imx: mx6/7 define CONFIG_SYS_VSNPRINTF Message-ID: <1452591924-24012-1-git-send-email-van.freenix@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Peng Fan Define CONFIG_SYS_VSNPRINTF to use snprintf. If not define CONFIG_SYS_VSNPRINTF, snprintf is sprintf. Report by Coverity: pass string init_val of unknown size to sprintf Signed-off-by: Peng Fan Cc: Peter Robinson Cc: Fabio Estevam Cc: Adrian Alonso Cc: Stefano Babic --- include/configs/mx6_common.h | 4 ++++ include/configs/mx7_common.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h index 1fd7ce3..1a470a4 100644 --- a/include/configs/mx6_common.h +++ b/include/configs/mx6_common.h @@ -17,6 +17,10 @@ #ifndef __MX6_COMMON_H #define __MX6_COMMON_H +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_VSNPRINTF +#endif + #ifndef CONFIG_MX6UL #define CONFIG_ARM_ERRATA_743622 #define CONFIG_ARM_ERRATA_751472 diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h index d507fb4..505f6cc 100644 --- a/include/configs/mx7_common.h +++ b/include/configs/mx7_common.h @@ -13,6 +13,10 @@ #include #include +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_VSNPRINTF +#endif + #ifndef CONFIG_MX7 #define CONFIG_MX7 #endif -- 2.6.2