Skip to contentSkip to conversation

Remove static type from gunzip_bmp()

PATCH Superseded Mark Jackson 2 participants 2 messages Jan 27, 2009

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove static type from gunzip_bmp()

THe current bmp routines support gzipped files, but compilation fails due to the gunzip_bmp() function being defined as static.

This patch fixes this problem.

---
  common/cmd_bmp.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
common/cmd_bmp.c +1 -1
index bc08b26..2104e59 100644
@@ -46,7 +46,7 @@ int gunzip(void *, int, unsigned char *, unsigned long *);
   * didn't contain a valid BMP signature.
   */
  #ifdef CONFIG_VIDEO_BMP_GZIP
-static bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
+bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
  {
  	void *dst;
  	unsigned long len;
#1 lore raw

PATCH 1/1 Remove static type from gunzip_bmp()

Dear Mark Jackson,

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

THe current bmp routines support gzipped files, but compilation fails due to the gunzip_bmp() function being defined as static.

I cannot confirm that. There are boards that use this feature, and they build fine.

Quoted 12 lines

This patch fixes this problem.

---
  common/cmd_bmp.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
common/cmd_bmp.c +0 -0
index bc08b26..2104e59 100644

common/cmd_bmp.c int gunzip(void *, int, unsigned char *, unsigned long *); · line 49

Quoted 5 lines
common/cmd_bmp.c +1 -1
@@ -46,7 +46,7 @@ int gunzip(void *, int, unsigned char *, unsigned long *);
   * didn't contain a valid BMP signature.
   */
  #ifdef CONFIG_VIDEO_BMP_GZIP
-static bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
+bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)

There is another ocurrence of "static bmp_image_t *gunzip_bmp()" in this file - you change one and leave the other unchanged.

If you change this, please change both places so they stay in sync, and add a proper prototype declaration to the header file.

Best regards,

Wolfgang Denk

Signature · 5 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
"A child is a person who can't understand why someone would give away
a perfectly good kitten."                               - Doug Larson