lkml.org 
[lkml]   [2017]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 7/7] include/linux/string.h: add the option of fortified string.h functions
On Sun, Sep 10, 2017 at 12:55 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
55e285a upstream.
>
>> --- a/include/linux/string.h
>> +++ b/include/linux/string.h
>> @@ -187,4 +187,204 @@ static inline const char *kbasename(const char *path)
>> return tail ? tail + 1 : path;
>> }
>>
>> +#define __FORTIFY_INLINE extern __always_inline __attribute__((gnu_inline))
>
> With gcc-4.1.2, I now get zillions of:
>
> include/linux/string.h:439: warning: ‘gnu_inline’ attribute
> directive ignored
>
> This attribute seems to be supported as of gcc 4.2?
>

I think in older compilers this was the default, so we could add a macro in
compiler.h that makes becomes an empty string there. If we do that,
we should also address these new warning on gcc-4.3:

arch/x86/include/asm/string_32.h:30: warning: 'strlen' declared inline
after being called
arch/x86/include/asm/string_32.h:252: warning: 'strnlen' declared
inline after being called
arch/x86/include/asm/string_32.h:252: warning: previous declaration of
'strnlen' was here
arch/x86/include/asm/string_32.h:145: warning: 'memcpy' declared
inline after being called
include/linux/string.h:81: warning: 'strlen' declared inline after being called
include/linux/string.h:81: warning: previous declaration of 'strlen' was here
include/linux/string.h:84: warning: 'strnlen' declared inline after being called
include/linux/string.h:84: warning: previous declaration of 'strnlen' was here

Arnd

\
 
 \ /
  Last update: 2017-09-10 15:51    [W:0.050 / U:6.156 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site