lkml.org 
[lkml]   [2020]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] mm: kmemleak: Use address-of operator on section symbols
On Thu, Feb 20, 2020 at 05:35:01PM -0800, Andrew Morton wrote:
> On Wed, 19 Feb 2020 22:15:51 -0700 Nathan Chancellor <natechancellor@gmail.com> wrote:
>
> > Clang warns:
> >
> > These are not true arrays, they are linker defined symbols, which are
> > just addresses. Using the address of operator silences the warning and
> > does not change the resulting assembly with either clang/ld.lld or
> > gcc/ld (tested with diff + objdump -Dr).
>
> I guess you forgot to quote the clang output?

Ugh yes, sorry. I can send a v3 later or here it is if you want to
stitch it in:

../mm/kmemleak.c:1955:28: warning: array comparison always evaluates to a constant [-Wtautological-compare]
if (__start_ro_after_init < _sdata || __end_ro_after_init > _edata)
^
../mm/kmemleak.c:1955:60: warning: array comparison always evaluates to a constant [-Wtautological-compare]
if (__start_ro_after_init < _sdata || __end_ro_after_init > _edata)
^
2 warnings generated.

Cheers,
Nathan

\
 
 \ /
  Last update: 2020-02-21 02:38    [W:0.063 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site