From: Peng Fan <van.freenix@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] imx: mx6/7 define CONFIG_SYS_VSNPRINTF
Date: Tue, 12 Jan 2016 17:45:24 +0800 [thread overview]
Message-ID: <1452591924-24012-1-git-send-email-van.freenix@gmail.com> (raw)
From: Peng Fan <peng.fan@nxp.com>
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 <peng.fan@nxp.com>
Cc: Peter Robinson <pbrobinson@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Adrian Alonso <aalonso@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
---
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 <asm/arch/imx-regs.h>
#include <asm/imx-common/gpio.h>
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_SYS_VSNPRINTF
+#endif
+
#ifndef CONFIG_MX7
#define CONFIG_MX7
#endif
--
2.6.2
next reply other threads:[~2016-01-12 9:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 9:45 Peng Fan [this message]
2016-01-13 19:57 ` [U-Boot] [PATCH] imx: mx6/7 define CONFIG_SYS_VSNPRINTF Tom Rini
2016-01-14 1:54 ` Peng Fan
2016-01-14 2:24 ` Peter Robinson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452591924-24012-1-git-send-email-van.freenix@gmail.com \
--to=van.freenix@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox