[U-Boot-Users] [PATCH 1/8] common: Suppress the warning 'p_buf'

Dave Liu r63238 at freescale.com
Thu Jan 10 16:01:53 CET 2008


clear the warning: unused variable 'p_buf'

Signed-off-by: Dave Liu <daveliu at freescale.com>
---
 common/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/main.c b/common/main.c
index ad2a386..4687c83 100644
--- a/common/main.c
+++ b/common/main.c
@@ -924,7 +924,6 @@ int readline (const char *const prompt)
 int readline_into_buffer (const char *const prompt, char * buffer)
 {
 	char *p = buffer;
-	char * p_buf = p;
 #ifdef CONFIG_CMDLINE_EDITING
 	unsigned int len=MAX_CMDBUF_SIZE;
 	int rc;
@@ -940,6 +939,7 @@ int readline_into_buffer (const char *const prompt, char * buffer)
 	rc = cread_line(prompt, p, &len);
 	return rc < 0 ? rc : len;
 #else
+	char *p_buf = p;
 	int	n = 0;				/* buffer index		*/
 	int	plen = 0;			/* prompt length	*/
 	int	col;				/* output column cnt	*/
-- 
1.5.3.5.643.g40e25







More information about the U-Boot mailing list