Skip to contentSkip to conversation

Fix compiler warning

PATCH New Kumar Gala 2 participants 2 messages Jan 10, 2008 – Jan 11, 2008

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 Fix compiler warning

main.c: In function 'readline_into_buffer':
main.c:927: warning: unused variable 'p_buf'

---
 common/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/main.c +1 -1
index ad2a386..1c7d73e 100644
@@ -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	*/
Signature · 1 line
1.5.3.7
#1 lore raw

PATCH 1/1 Fix compiler warning

Quoted 4 lines · In message <[email protected]> you wrote:

main.c: In function 'readline_into_buffer':
main.c:927: warning: unused variable 'p_buf'

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 8 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Every revolutionary idea - in science, politics, art, or  whatever  -
evokes three stages of reaction in a hearer:
  1. It is completely impossible - don't waste my time.
  2. It is possible, but it is not worth doing.
  3. I said it was a good idea all along.