# make Working around non-functional -combine Compiling whole program out/ccode.16.s In file included from out/ccode.16.s.tmp.c:5: out/../src/util.h:204: warning: ‘memcpy_fl’ declared inline after being called out/../src/util.h:204: warning: previous declaration of ‘memcpy_fl’ was here Compiling (16bit) out/code16.o Compiling whole program out/ccode32flat.o In file included from out/ccode32flat.o.tmp.c:5: out/../src/util.h:204: warning: ‘memcpy_fl’ declared inline after being called out/../src/util.h:204: warning: previous declaration of ‘memcpy_fl’ was here Compiling whole program out/code32seg.o
This patch fix above warnings.
Signed-off-by: Lin Ming ming.m.lin@intel.com --- src/util.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/util.h b/src/util.h index f5b9446..cadebdb 100644 --- a/src/util.h +++ b/src/util.h @@ -201,7 +201,7 @@ void *memset(void *s, int c, size_t n); void memset_fl(void *ptr, u8 val, size_t size); inline void memcpy_far(u16 d_seg, void *d_far , u16 s_seg, const void *s_far, size_t len); -void memcpy_fl(void *d_fl, const void *s_fl, size_t len); +inline void memcpy_fl(void *d_fl, const void *s_fl, size_t len); void *memcpy(void *d1, const void *s1, size_t len); #if MODESEGMENT == 0 #define memcpy __builtin_memcpy
On Wed, Dec 29, 2010 at 10:16:34AM +0800, Lin Ming wrote:
# make Working around non-functional -combine Compiling whole program out/ccode.16.s In file included from out/ccode.16.s.tmp.c:5: out/../src/util.h:204: warning: ‘memcpy_fl’ declared inline after being called out/../src/util.h:204: warning: previous declaration of ‘memcpy_fl’ was here Compiling (16bit) out/code16.o Compiling whole program out/ccode32flat.o In file included from out/ccode32flat.o.tmp.c:5: out/../src/util.h:204: warning: ‘memcpy_fl’ declared inline after being called out/../src/util.h:204: warning: previous declaration of ‘memcpy_fl’ was here Compiling whole program out/code32seg.o
This is usually an indicator of an old compiler. What gcc version are you using?
-Kevin
On Wed, 2010-12-29 at 12:09 +0800, Kevin O'Connor wrote:
On Wed, Dec 29, 2010 at 10:16:34AM +0800, Lin Ming wrote:
# make Working around non-functional -combine Compiling whole program out/ccode.16.s In file included from out/ccode.16.s.tmp.c:5: out/../src/util.h:204: warning: ‘memcpy_fl’ declared inline after being called out/../src/util.h:204: warning: previous declaration of ‘memcpy_fl’ was here Compiling (16bit) out/code16.o Compiling whole program out/ccode32flat.o In file included from out/ccode32flat.o.tmp.c:5: out/../src/util.h:204: warning: ‘memcpy_fl’ declared inline after being called out/../src/util.h:204: warning: previous declaration of ‘memcpy_fl’ was here Compiling whole program out/code32seg.o
This is usually an indicator of an old compiler. What gcc version are you using?
# gcc --version gcc (Debian 4.3.2-1.1) 4.3.2
-Kevin