lkml.org 
[lkml]   [2017]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectinclude/linux/string.h:413: error: '______f' is static but declared in inline function 'memcpy_and_pad' which is not static
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4dfc2788033d30dfccfd4268e06dd73ce2c654ed
commit: 01f33c336e2d298ea5d4ce5d6e5bcd12865cc30f string.h: add memcpy_and_pad()
date: 12 days ago
config: x86_64-randconfig-b0-09100601 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
git checkout 01f33c336e2d298ea5d4ce5d6e5bcd12865cc30f
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

cc1: warnings being treated as errors
In file included from include/linux/bitmap.h:8,
from include/linux/cpumask.h:11,
from arch/x86/include/asm/cpumask.h:4,
from arch/x86/include/asm/msr.h:10,
from arch/x86/include/asm/processor.h:20,
from arch/x86/include/asm/cpufeature.h:4,
from arch/x86/include/asm/thread_info.h:52,
from include/linux/thread_info.h:37,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/slab.h:14,
from include/linux/resource_ext.h:19,
from include/linux/acpi.h:26,
from drivers/gpu//drm/i915/i915_drv.c:30:
include/linux/string.h: In function 'memcpy_and_pad':
>> include/linux/string.h:413: error: '______f' is static but declared in inline function 'memcpy_and_pad' which is not static
include/linux/string.h:414: error: '______f' is static but declared in inline function 'memcpy_and_pad' which is not static
include/linux/string.h:416: error: '______f' is static but declared in inline function 'memcpy_and_pad' which is not static
include/linux/string.h:419: error: '______f' is static but declared in inline function 'memcpy_and_pad' which is not static
include/linux/string.h:421: error: '______f' is static but declared in inline function 'memcpy_and_pad' which is not static

vim +413 include/linux/string.h

398
399 /**
400 * memcpy_and_pad - Copy one buffer to another with padding
401 * @dest: Where to copy to
402 * @dest_len: The destination buffer size
403 * @src: Where to copy from
404 * @count: The number of bytes to copy
405 * @pad: Character to use for padding if space is left in destination.
406 */
407 __FORTIFY_INLINE void memcpy_and_pad(void *dest, size_t dest_len,
408 const void *src, size_t count, int pad)
409 {
410 size_t dest_size = __builtin_object_size(dest, 0);
411 size_t src_size = __builtin_object_size(src, 0);
412
> 413 if (__builtin_constant_p(dest_len) && __builtin_constant_p(count)) {
414 if (dest_size < dest_len && dest_size < count)
415 __write_overflow();
416 else if (src_size < dest_len && src_size < count)
417 __read_overflow3();
418 }
419 if (dest_size < dest_len)
420 fortify_panic(__func__);
421 if (dest_len > count) {
422 memcpy(dest, src, count);
423 memset(dest + count, pad, dest_len - count);
424 } else
425 memcpy(dest, src, dest_len);
426 }
427

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2017-09-10 01:14    [W:0.034 / U:3.644 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site