Skip to contentSkip to conversation

x86-64: add memcpy/memset prototypes

PATCH New Randy.Dunlap 1 participant 1 message Mar 15, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86-64: add memcpy/memset prototypes

(resend)

Put function prototypes for memset() and memcpy() ahead of where there are used, to kill sparse warnings:

arch/x86_64/boot/compressed/../../../../lib/inflate.c:317:3: warning: undefined identifier 'memset' arch/x86_64/boot/compressed/../../../../lib/inflate.c:601:11: warning: undefined identifier 'memcpy' arch/x86_64/boot/compressed/misc.c:151:2: warning: undefined identifier 'memcpy' arch/x86_64/boot/compressed/../../../../lib/inflate.c:317:3: warning: call with no type! arch/x86_64/boot/compressed/../../../../lib/inflate.c:601:17: warning: call with no type! arch/x86_64/boot/compressed/misc.c:151:9: warning: call with no type!

diffstat:=

 arch/x86_64/boot/compressed/misc.c |    3 +++
 1 files changed, 3 insertions(+)
arch/x86_64/boot/compressed/misc.c renamed from arch/x86_64/boot/compressed/misc.c~misc_includes +3 -0
diff -Naurp ./arch/x86_64/boot/compressed/misc.c~misc_includes ./arch/x86_64/boot/compressed/misc.c
@@ -92,6 +92,9 @@ static unsigned long output_ptr = 0;
 static void *malloc(int size);
 static void free(void *where);
  
+void* memset(void* s, int c, unsigned n);
+void* memcpy(void* dest, const void* src, unsigned n);
+
 static void putstr(const char *);
   
 extern int end;

---