Kernel build warnings

From: Chris Ward
Date: Wed Nov 07 2018 - 07:23:42 EST


I recently had reason to build the Linux kernel (debugging a problem on OpenSuSE Tumbleweed), and I

got a number of warnings. They are all about 'strncpy' buffers being possibly 1 byte too short to hold the

trailing NUL in a string. I have sent a log of the warnings attached to this email; the first warning is here

as a sample.

 CC kernel/debug/kdb/kdb_io.o
kernel/debug/kdb/kdb_io.c: In function âkdb_getstrâ:
kernel/debug/kdb/kdb_io.c:446:3: warning: âstrncpyâ specified bound 256 equals destination size [-Wstringop-truncation]
ÂÂ strncpy(kdb_prompt_str, prompt, CMD_BUFLEN);
ÂÂ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Should the kernel be revised to eliminate these warnings ?

--
Chris Ward

CC kernel/debug/kdb/kdb_io.o
kernel/debug/kdb/kdb_io.c: In function âkdb_getstrâ:
kernel/debug/kdb/kdb_io.c:446:3: warning: âstrncpyâ specified bound 256 equals destination size [-Wstringop-truncation]
strncpy(kdb_prompt_str, prompt, CMD_BUFLEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC kernel/debug/kdb/kdb_main.o
In function âhandle_ctrl_cmdâ,
inlined from âkdb_local.isra.6â at kernel/debug/kdb/kdb_main.c:1323:10,
inlined from âkdb_main_loopâ at kernel/debug/kdb/kdb_main.c:1422:12:
kernel/debug/kdb/kdb_main.c:1106:3: warning: âstrncpyâ specified bound 200 equals destination size [-Wstringop-truncation]
strncpy(cmd_cur, cmd_hist[cmdptr], CMD_BUFLEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/debug/kdb/kdb_main.c:1111:3: warning: âstrncpyâ specified bound 200 equals destination size [-Wstringop-truncation]
strncpy(cmd_cur, cmd_hist[cmdptr], CMD_BUFLEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC kernel/debug/kdb/kdb_support.o
kernel/debug/kdb/kdb_support.c: In function âkallsyms_symbol_nextâ:
kernel/debug/kdb/kdb_support.c:239:4: warning: âstrncpyâ specified bound depends on the length of the source argument [-Wstringop-overflow=]
strncpy(prefix_name, name, strlen(name)+1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/debug/kdb/kdb_support.c:239:31: note: length computed here
strncpy(prefix_name, name, strlen(name)+1);
^~~~~~~~~~~~
CC [M] fs/ceph/mds_client.o
fs/ceph/mds_client.c: In function âceph_mdsc_initâ:
fs/ceph/mds_client.c:3647:2: warning: âstrncpyâ output may be truncated copying 64 bytes from a string of length 64 [-Wstringop-truncation]
strncpy(mdsc->nodename, utsname()->nodename,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(mdsc->nodename) - 1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] fs/cifs/cifsencrypt.o
fs/cifs/cifsencrypt.c: In function âcalc_lanman_hashâ:
fs/cifs/cifsencrypt.c:306:3: warning: âstrncpyâ specified bound 16 equals destination size [-Wstringop-truncation]
strncpy(password_with_pad, password, CIFS_ENCPWD_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] fs/configfs/symlink.o
In function âfill_item_pathâ,
inlined from âconfigfs_get_target_pathâ at fs/configfs/symlink.c:250:2,
inlined from âconfigfs_getlinkâ at fs/configfs/symlink.c:272:10,
inlined from âconfigfs_get_link.part.9â at fs/configfs/symlink.c:295:10,
inlined from âconfigfs_get_linkâ:
fs/configfs/symlink.c:67:3: warning: âstrncpyâ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(buffer + length,config_item_name(p),cur);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/configfs/symlink.c: In function âconfigfs_get_linkâ:
fs/configfs/symlink.c:63:13: note: length computed here
int cur = strlen(config_item_name(p));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
CC fs/ext4/super.o
fs/ext4/super.c: In function â__save_error_infoâ:
fs/ext4/super.c:326:2: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(es->s_last_error_func, func, sizeof(es->s_last_error_func));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/super.c:330:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(es->s_first_error_func, func,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(es->s_first_error_func));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] fs/f2fs/namei.o
fs/f2fs/namei.c: In function âf2fs_update_extension_listâ:
fs/f2fs/namei.c:257:3: warning: âstrncpyâ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(extlist[cold_count], name, strlen(name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/f2fs/namei.c:249:3: warning: âstrncpyâ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(extlist[count], name, strlen(name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] fs/hfsplus/xattr.o
fs/hfsplus/xattr.c: In function âcopy_nameâ:
fs/hfsplus/xattr.c:416:3: warning: âstrncpyâ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
strncpy(buffer, XATTR_MAC_OSX_PREFIX, XATTR_MAC_OSX_PREFIX_LEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC fs/kernfs/symlink.o
In function âkernfs_get_target_pathâ,
inlined from âkernfs_getlink.isra.2â at fs/kernfs/symlink.c:109:10,
inlined from âkernfs_iop_get_link.part.3â at fs/kernfs/symlink.c:127:10,
inlined from âkernfs_iop_get_linkâ:
fs/kernfs/symlink.c:91:3: warning: âstrncpyâ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(s + len, kn->name, slen);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/kernfs/symlink.c: In function âkernfs_iop_get_linkâ:
fs/kernfs/symlink.c:88:14: note: length computed here
int slen = strlen(kn->name);
^~~~~~~~~~~~~~~~
CC fs/fs-writeback.o
In file included from ./include/trace/define_trace.h:97,
from ./include/trace/events/writeback.h:762,
from fs/fs-writeback.c:98:
./include/trace/events/writeback.h: In function âperf_trace_writeback_work_classâ:
./include/trace/events/writeback.h:223:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
wb->bdi->dev ? dev_name(wb->bdi->dev) : "(unknown)", 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:222:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âperf_trace_writeback_classâ:
./include/trace/events/writeback.h:277:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(wb->bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:276:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âperf_trace_writeback_bdi_registerâ:
./include/trace/events/writeback.h:299:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/writeback.h:292:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(writeback_bdi_register,
^~~~~~~~~~~
./include/trace/events/writeback.h:298:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âperf_trace_wbc_classâ:
./include/trace/events/writeback.h:324:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:323:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âperf_trace_writeback_queue_ioâ:
./include/trace/events/writeback.h:375:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(wb->bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/writeback.h:360:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(writeback_queue_io,
^~~~~~~~~~~
./include/trace/events/writeback.h:373:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âperf_trace_writeback_dirty_inode_templateâ:
./include/trace/events/writeback.h:99:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
bdi->dev ? dev_name(bdi->dev) : "(unknown)", 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:95:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âperf_trace_writeback_sb_inodes_requeueâ:
./include/trace/events/writeback.h:586:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
dev_name(inode_to_bdi(inode)->dev), 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/writeback.h:572:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(writeback_sb_inodes_requeue,
^~~~~~~~~~~
./include/trace/events/writeback.h:585:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âperf_trace_writeback_write_inode_templateâ:
./include/trace/events/writeback.h:179:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
dev_name(inode_to_bdi(inode)->dev), 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:178:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âperf_trace_writeback_single_inode_templateâ:
./include/trace/events/writeback.h:660:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
dev_name(inode_to_bdi(inode)->dev), 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:659:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âperf_trace_writeback_dirty_pageâ:
./include/trace/events/writeback.h:69:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
mapping ? dev_name(inode_to_bdi(mapping->host)->dev) : "(unknown)", 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/writeback.h:56:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(writeback_dirty_page,
^~~~~~~~~~~
./include/trace/events/writeback.h:68:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
In file included from ./include/trace/define_trace.h:96,
from ./include/trace/events/writeback.h:762,
from fs/fs-writeback.c:98:
./include/trace/events/writeback.h: In function âtrace_event_raw_event_writeback_bdi_registerâ:
./include/trace/events/writeback.h:299:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/writeback.h:292:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(writeback_bdi_register,
^~~~~~~~~~~
./include/trace/events/writeback.h:298:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âtrace_event_raw_event_writeback_classâ:
./include/trace/events/writeback.h:277:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(wb->bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:276:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âtrace_event_raw_event_writeback_dirty_inode_templateâ:
./include/trace/events/writeback.h:99:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
bdi->dev ? dev_name(bdi->dev) : "(unknown)", 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:95:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âtrace_event_raw_event_writeback_dirty_pageâ:
./include/trace/events/writeback.h:69:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
mapping ? dev_name(inode_to_bdi(mapping->host)->dev) : "(unknown)", 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/writeback.h:56:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(writeback_dirty_page,
^~~~~~~~~~~
./include/trace/events/writeback.h:68:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âtrace_event_raw_event_writeback_sb_inodes_requeueâ:
./include/trace/events/writeback.h:586:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
dev_name(inode_to_bdi(inode)->dev), 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/writeback.h:572:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(writeback_sb_inodes_requeue,
^~~~~~~~~~~
./include/trace/events/writeback.h:585:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âtrace_event_raw_event_wbc_classâ:
./include/trace/events/writeback.h:324:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:323:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âtrace_event_raw_event_writeback_write_inode_templateâ:
./include/trace/events/writeback.h:179:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
dev_name(inode_to_bdi(inode)->dev), 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:178:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âtrace_event_raw_event_writeback_work_classâ:
./include/trace/events/writeback.h:223:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
wb->bdi->dev ? dev_name(wb->bdi->dev) : "(unknown)", 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:222:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âtrace_event_raw_event_writeback_queue_ioâ:
./include/trace/events/writeback.h:375:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(wb->bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/writeback.h:360:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(writeback_queue_io,
^~~~~~~~~~~
./include/trace/events/writeback.h:373:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/writeback.h: In function âtrace_event_raw_event_writeback_single_inode_templateâ:
./include/trace/events/writeback.h:660:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name,
^~~~~~~~~~~~~~~~~~~~~~
dev_name(inode_to_bdi(inode)->dev), 32);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/events/writeback.h:659:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~

CC security/selinux/hooks.o
security/selinux/hooks.c: In function âselinux_ib_endport_manage_subnetâ:
security/selinux/hooks.c:6718:2: warning: âstrncpyâ specified bound 64 equals destination size [-Wstringop-truncation]
strncpy(ibendport.dev_name, dev_name, sizeof(ibendport.dev_name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CC block/blk-wbt.o
In file included from ./include/trace/define_trace.h:97,
from ./include/trace/events/wbt.h:154,
from block/blk-wbt.c:30:
./include/trace/events/wbt.h: In function âperf_trace_wbt_statâ:
./include/trace/events/wbt.h:36:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/wbt.h:15:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(wbt_stat,
^~~~~~~~~~~
./include/trace/events/wbt.h:35:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/wbt.h: In function âperf_trace_wbt_latâ:
./include/trace/events/wbt.h:70:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/wbt.h:58:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(wbt_lat,
^~~~~~~~~~~
./include/trace/events/wbt.h:69:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/wbt.h: In function âperf_trace_wbt_stepâ:
./include/trace/events/wbt.h:106:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/wbt.h:87:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(wbt_step,
^~~~~~~~~~~
./include/trace/events/wbt.h:105:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/wbt.h: In function âperf_trace_wbt_timerâ:
./include/trace/events/wbt.h:141:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/perf.h:66:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/wbt.h:126:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(wbt_timer,
^~~~~~~~~~~
./include/trace/events/wbt.h:140:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
In file included from ./include/trace/define_trace.h:96,
from ./include/trace/events/wbt.h:154,
from block/blk-wbt.c:30:
./include/trace/events/wbt.h: In function âtrace_event_raw_event_wbt_statâ:
./include/trace/events/wbt.h:36:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/wbt.h:15:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(wbt_stat,
^~~~~~~~~~~
./include/trace/events/wbt.h:35:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/wbt.h: In function âtrace_event_raw_event_wbt_latâ:
./include/trace/events/wbt.h:70:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/wbt.h:58:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(wbt_lat,
^~~~~~~~~~~
./include/trace/events/wbt.h:69:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/wbt.h: In function âtrace_event_raw_event_wbt_timerâ:
./include/trace/events/wbt.h:141:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/wbt.h:126:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(wbt_timer,
^~~~~~~~~~~
./include/trace/events/wbt.h:140:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~
./include/trace/events/wbt.h: In function âtrace_event_raw_event_wbt_stepâ:
./include/trace/events/wbt.h:106:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(__entry->name, dev_name(bdi->dev), 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:720:4: note: in definition of macro âDECLARE_EVENT_CLASSâ
{ assign; } \
^~~~~~
./include/trace/trace_events.h:78:9: note: in expansion of macro âPARAMSâ
PARAMS(assign), \
^~~~~~
./include/trace/events/wbt.h:87:1: note: in expansion of macro âTRACE_EVENTâ
TRACE_EVENT(wbt_step,
^~~~~~~~~~~
./include/trace/events/wbt.h:105:2: note: in expansion of macro âTP_fast_assignâ
TP_fast_assign(
^~~~~~~~~~~~~~

CC [M] drivers/crypto/ccp/ccp-crypto-sha.o
In function âccp_register_hmac_alg.isra.3â,
inlined from âccp_register_sha_algâ at drivers/crypto/ccp/ccp-crypto-sha.c:521:8,
inlined from âccp_register_sha_algsâ at drivers/crypto/ccp/ccp-crypto-sha.c:534:9:
drivers/crypto/ccp/ccp-crypto-sha.c:439:2: warning: âstrncpyâ specified bound 128 equals destination size [-Wstringop-truncation]
strncpy(ccp_alg->child_alg, def->name, CRYPTO_MAX_ALG_NAME);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC drivers/devfreq/devfreq.o
In function âdevfreq_add_device.part.13â,
inlined from âdevfreq_add_deviceâ:
drivers/devfreq/devfreq.c:593:2: warning: âstrncpyâ specified bound 16 equals destination size [-Wstringop-truncation]
strncpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.o
In function âamdgpu_dm_create_common_modeâ,
inlined from âamdgpu_dm_connector_add_common_modesâ at drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3434:10:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3377:2: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(mode->name, name, DRM_DISPLAY_MODE_LEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function âfill_audio_infoâ,
inlined from âcreate_stream_for_sinkâ at drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2498:2:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2287:2: warning: âstrncpyâ output may be truncated copying 19 bytes from a string of length 19 [-Wstringop-truncation]
strncpy(audio_info->display_name,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
edid_caps->display_name,
~~~~~~~~~~~~~~~~~~~~~~~~
AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS - 1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/gpu/drm/nouveau/nvif/client.o
drivers/gpu/drm/nouveau/nvif/client.c: In function ânvif_client_initâ:
drivers/gpu/drm/nouveau/nvif/client.c:72:2: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(args.name, name, sizeof(args.name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/gpu/drm/nouveau/nvkm/engine/device/user.o
In function ânvkm_udevice_infoâ,
inlined from ânvkm_udevice_mthdâ at drivers/gpu/drm/nouveau/nvkm/engine/device/user.c:223:10:
drivers/gpu/drm/nouveau/nvkm/engine/device/user.c:192:2: warning: âstrncpyâ specified bound 16 equals destination size [-Wstringop-truncation]
strncpy(args->v0.chip, device->chip->name, sizeof(args->v0.chip));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/infiniband/hw/hfi1/verbs.o
drivers/infiniband/hw/hfi1/verbs.c: In function âhfi1_register_ib_deviceâ:
drivers/infiniband/hw/hfi1/verbs.c:1901:2: warning: âstrncpyâ output may be truncated copying 64 bytes from a string of length 64 [-Wstringop-truncation]
strncpy(ibdev->node_desc, init_utsname()->nodename,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(ibdev->node_desc));
~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/infiniband/hw/ocrdma/ocrdma_hw.o
In function âocrdma_mbx_get_ctrl_attribsâ,
inlined from âocrdma_init_hwâ at drivers/infiniband/hw/ocrdma/ocrdma_hw.c:3227:11:
drivers/infiniband/hw/ocrdma/ocrdma_hw.c:1368:3: warning: âstrncpyâ output may be truncated copying 31 bytes from a string of length 31 [-Wstringop-truncation]
strncpy(dev->model_number,
^~~~~~~~~~~~~~~~~~~~~~~~~~
hba_attribs->controller_model_number, 31);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/infiniband/hw/usnic/usnic_fwd.o
drivers/infiniband/hw/usnic/usnic_fwd.c: In function âusnic_fwd_dev_allocâ:
drivers/infiniband/hw/usnic/usnic_fwd.c:95:2: warning: âstrncpyâ output may be truncated copying 16 bytes from a string of length 20 [-Wstringop-truncation]
strncpy(ufdev->name, netdev_name(ufdev->netdev),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(ufdev->name) - 1);
~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/isdn/capi/capidrv.o
drivers/isdn/capi/capidrv.c: In function âcapidrv_commandâ:
drivers/isdn/capi/capidrv.c:2016:3: warning: âstrncpyâ output may be truncated copying 32 bytes from a string of length 49 [-Wstringop-truncation]
strncpy(bchan->msn, c->parm.num, ISDN_MSNLEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/isdn/capi/capidrv.c:1827:3: warning: âstrncpyâ output may be truncated copying 32 bytes from a string of length 49 [-Wstringop-truncation]
strncpy(bchan->num, c->parm.setup.phone, sizeof(bchan->num));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/isdn/capi/capidrv.c: In function âcapidrv_addcontrâ:
drivers/isdn/capi/capidrv.c:2302:2: warning: âstrncpyâ output may be truncated copying 19 bytes from a string of length 19 [-Wstringop-truncation]
strncpy(card->interface.id, id, sizeof(card->interface.id) - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/isdn/i4l/isdn_net.o
drivers/isdn/i4l/isdn_net.c: In function âisdn_net_getpeerâ:
drivers/isdn/i4l/isdn_net.c:2997:2: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(phone->phone, dev->num[idx], ISDN_MSNLEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/isdn/i4l/isdn_tty.o
drivers/isdn/i4l/isdn_tty.c: In function âisdn_tty_suspend.isra.12â:
drivers/isdn/i4l/isdn_tty.c:790:3: warning: âstrncpyâ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(&cmd.parm.cmsg.para[6], id, l);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/isdn/i4l/isdn_tty.c:778:6: note: length computed here
l = strlen(id);
^~~~~~~~~~
drivers/isdn/i4l/isdn_tty.c: In function âisdn_tty_resumeâ:
drivers/isdn/i4l/isdn_tty.c:880:3: warning: âstrncpyâ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(&cmd.parm.cmsg.para[6], id, l);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/isdn/i4l/isdn_tty.c:817:6: note: length computed here
l = strlen(id);
^~~~~~~~~~
drivers/isdn/i4l/isdn_tty.c: In function âisdn_tty_stat_callbackâ:
drivers/isdn/i4l/isdn_tty.c:2054:4: warning: âstrncpyâ output may be truncated copying 5 bytes from a string of length 49 [-Wstringop-truncation]
strncpy(info->last_cause, c->parm.num, 5);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/md/dm-log-userspace-base.o
drivers/md/dm-log-userspace-base.c: In function âuserspace_ctrâ:
drivers/md/dm-log-userspace-base.c:226:2: warning: âstrncpyâ specified bound 129 equals destination size [-Wstringop-truncation]
strncpy(lc->uuid, argv[0], DM_UUID_LEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/misc/c2port/core.o
In function âc2port_device_register.part.2â,
inlined from âc2port_device_registerâ:
drivers/misc/c2port/core.c:929:2: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(c2dev->name, name, C2PORT_NAME_LEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/net/ethernet/amazon/ena/ena_netdev.o
In function âena_config_host_infoâ,
inlined from âena_device_initâ at drivers/net/ethernet/amazon/ena/ena_netdev.c:2482:2:
drivers/net/ethernet/amazon/ena/ena_netdev.c:2247:2: warning: âstrncpyâ output may be truncated copying 31 bytes from a string of length 64 [-Wstringop-truncation]
strncpy(host_info->kernel_ver_str, utsname()->version,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(host_info->kernel_ver_str) - 1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/net/ethernet/intel/i40e/i40e_ptp.o
In function âi40e_ptp_create_clockâ,
inlined from âi40e_ptp_initâ at drivers/net/ethernet/intel/i40e/i40e_ptp.c:755:8:
drivers/net/ethernet/intel/i40e/i40e_ptp.c:697:2: warning: âstrncpyâ specified bound 16 equals destination size [-Wstringop-truncation]
strncpy(pf->ptp_caps.name, i40e_driver_name, sizeof(pf->ptp_caps.name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/net/hamradio/hdlcdrv.o
drivers/net/hamradio/hdlcdrv.c: In function âhdlcdrv_ioctl.part.8â:
drivers/net/hamradio/hdlcdrv.c:614:4: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(bi.data.drivername, s->ops->drvname,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(bi.data.drivername));
~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.o
In function âbrcmf_vndr_ieâ,
inlined from âbrcmf_vif_set_mgmt_ieâ at drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:4278:25:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:4167:2: warning: âstrncpyâ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
strncpy(iebuf, add_del_cmd, VNDR_IE_CMD_LEN - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function âbrcmf_vndr_ieâ,
inlined from âbrcmf_vif_set_mgmt_ieâ at drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:4315:25:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:4167:2: warning: âstrncpyâ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
strncpy(iebuf, add_del_cmd, VNDR_IE_CMD_LEN - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/net/wireless/intel/iwlwifi/fw/dbg.o
drivers/net/wireless/intel/iwlwifi/fw/dbg.c: In function âiwl_fw_error_dumpâ:
drivers/net/wireless/intel/iwlwifi/fw/dbg.c:753:2: warning: âstrncpyâ specified bound 64 equals destination size [-Wstringop-truncation]
strncpy(dump_info->dev_human_readable, fwrt->trans->cfg->name,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(dump_info->dev_human_readable));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/net/wireless/intersil/hostap/hostap_ioctl.o
In function âprism2_ioctl_get_encryptionâ,
inlined from âprism2_ioctl_priv_hostapd.isra.14â at drivers/net/wireless/intersil/hostap/hostap_ioctl.c:3813:9,
inlined from âhostap_ioctlâ at drivers/net/wireless/intersil/hostap/hostap_ioctl.c:4038:14:
drivers/net/wireless/intersil/hostap/hostap_ioctl.c:3611:3: warning: âstrncpyâ specified bound 16 equals destination size [-Wstringop-truncation]
strncpy(param->u.crypt.alg, (*crypt)->ops->name,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HOSTAP_CRYPT_ALG_NAME_LEN);
~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/net/wireless/intersil/prism54/isl_ioctl.o
drivers/net/wireless/intersil/prism54/isl_ioctl.c: In function âprism54_get_nameâ:
drivers/net/wireless/intersil/prism54/isl_ioctl.c:284:2: warning: âstrncpyâ output may be truncated copying 16 bytes from a string of length 28 [-Wstringop-truncation]
strncpy(cwrq, capabilities, IFNAMSIZ);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/net/wireless/realtek/rtl818x/rtl8187/leds.o
drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c: In function ârtl8187_register_ledâ:
drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c:149:2: warning: âstrncpyâ specified bound 22 equals destination size [-Wstringop-truncation]
strncpy(led->name, name, sizeof(led->name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/net/wireless/ray_cs.o
In function âinit_startup_paramsâ,
inlined from âray_initâ at drivers/net/wireless/ray_cs.c:513:2,
inlined from âray_configâ at drivers/net/wireless/ray_cs.c:429:6,
inlined from âray_probeâ at drivers/net/wireless/ray_cs.c:328:9:
drivers/net/wireless/ray_cs.c:638:3: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(local->sparm.b4.a_current_ess_id, essid, ESSID_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC drivers/nvme/host/core.o
In function ânvme_init_subnqn.isra.49â,
inlined from ânvme_init_subsystemâ at drivers/nvme/host/core.c:2207:2,
inlined from ânvme_init_identifyâ at drivers/nvme/host/core.c:2365:9:
drivers/nvme/host/core.c:2061:3: warning: âstrncpyâ output may be truncated copying 223 bytes from a string of length 255 [-Wstringop-truncation]
strncpy(subsys->subnqn, id->subnqn, NVMF_NQN_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/nvme/target/discovery.o
drivers/nvme/target/discovery.c: In function ânvmet_execute_identify_disc_ctrlâ:
drivers/nvme/target/discovery.c:160:2: warning: âstrncpyâ output truncated copying 8 bytes from a string of length 17 [-Wstringop-truncation]
strncpy((char *)id->fr, UTS_RELEASE, sizeof(id->fr));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/scsi/arcmsr/arcmsr_hba.o
drivers/scsi/arcmsr/arcmsr_hba.c: In function âarcmsr_handle_virtual_commandâ:
drivers/scsi/arcmsr/arcmsr_hba.c:2969:3: warning: âstrncpyâ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
strncpy(&inqdata[8], "Areca ", 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/arcmsr/arcmsr_hba.c:2971:3: warning: âstrncpyâ output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation]
strncpy(&inqdata[16], "RAID controller ", 16);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/arcmsr/arcmsr_hba.c:2973:3: warning: âstrncpyâ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
strncpy(&inqdata[32], "R001", 4); /* Product Revision */
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/scsi/libfc/fc_elsct.o
In file included from drivers/scsi/libfc/fc_elsct.c:30:
In function âfc_ct_ms_fill.isra.8â,
inlined from âfc_ct_fillâ at ./include/scsi/fc_encode.h:518:8,
inlined from âfc_elsct_sendâ at drivers/scsi/libfc/fc_elsct.c:59:8:
./include/scsi/fc_encode.h:275:3: warning: âstrncpyâ output may be truncated copying 64 bytes from a string of length 79 [-Wstringop-truncation]
strncpy((char *)&entry->value,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fc_host_manufacturer(lport->host),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FC_FDMI_HBA_ATTR_MANUFACTURER_LEN);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/scsi/fc_encode.h:287:3: warning: âstrncpyâ output may be truncated copying 64 bytes from a string of length 79 [-Wstringop-truncation]
strncpy((char *)&entry->value,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fc_host_serial_number(lport->host),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/scsi/pm8001/pm8001_sas.o
drivers/scsi/pm8001/pm8001_sas.c: In function âpm8001_issue_ssp_tmf.part.12â:
drivers/scsi/pm8001/pm8001_sas.c:886:2: warning: âstrncpyâ specified bound 8 equals destination size [-Wstringop-truncation]
strncpy((u8 *)&ssp_task.LUN, lun, 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/scsi/qla2xxx/qla_mr.o
drivers/scsi/qla2xxx/qla_mr.c: In function âqlafx00_fx_discâ:
drivers/scsi/qla2xxx/qla_mr.c:1882:4: warning: âstrncpyâ output may be truncated copying 64 bytes from a string of length 64 [-Wstringop-truncation]
strncpy(phost_info->nodename,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p_sysid->nodename, NODENAME_LENGTH);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_mr.c:1886:4: warning: âstrncpyâ output may be truncated copying 64 bytes from a string of length 64 [-Wstringop-truncation]
strncpy(phost_info->release,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p_sysid->release, RELEASE_LENGTH);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_mr.c:1888:4: warning: âstrncpyâ output may be truncated copying 64 bytes from a string of length 64 [-Wstringop-truncation]
strncpy(phost_info->version,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p_sysid->version, VERSION_LENGTH);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_mr.c:1890:4: warning: âstrncpyâ output may be truncated copying 64 bytes from a string of length 64 [-Wstringop-truncation]
strncpy(phost_info->machine,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p_sysid->machine, MACHINE_LENGTH);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_mr.c:1892:4: warning: âstrncpyâ output may be truncated copying 64 bytes from a string of length 64 [-Wstringop-truncation]
strncpy(phost_info->domainname,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p_sysid->domainname, DOMNAME_LENGTH);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/scsi/ips.o
drivers/scsi/ips.c: In function âips_send_cmdâ:
drivers/scsi/ips.c:3518:6: warning: âstrncpyâ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
strncpy(inquiry.VendorId, "IBM ",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8);
~~
drivers/scsi/ips.c:3520:6: warning: âstrncpyâ output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation]
strncpy(inquiry.ProductId,
^~~~~~~~~~~~~~~~~~~~~~~~~~
"SERVERAID ", 16);
~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ips.c:3522:6: warning: âstrncpyâ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
strncpy(inquiry.ProductRevisionLevel,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"1.00", 4);
~~~~~~~~~~
drivers/scsi/ips.c: In function âips_inquiryâ:
drivers/scsi/ips.c:4039:2: warning: âstrncpyâ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
strncpy(inquiry.VendorId, "IBM ", 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ips.c:4040:2: warning: âstrncpyâ output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation]
strncpy(inquiry.ProductId, "SERVERAID ", 16);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ips.c:4041:2: warning: âstrncpyâ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
strncpy(inquiry.ProductRevisionLevel, "1.00", 4);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ips.c: In function âips_write_driver_statusâ:
drivers/scsi/ips.c:5625:2: warning: âstrncpyâ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
strncpy((char *) ha->nvram->driver_high, IPS_VERSION_HIGH, 4);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ips.c:5626:2: warning: âstrncpyâ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
strncpy((char *) ha->nvram->driver_low, IPS_VERSION_LOW, 4);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ips.c: In function âips_get_bios_versionâ:
drivers/scsi/ips.c:2243:2: warning: âstrncpyâ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
strncpy(ha->bios_version, " ?", 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function âips_write_driver_status.constpropâ,
inlined from âips_hainitâ at drivers/scsi/ips.c:2434:7,
inlined from âips_init_phase2â at drivers/scsi/ips.c:7081:7:
drivers/scsi/ips.c:5627:2: warning: âstrncpyâ output may be truncated copying 4 bytes from a string of length 7 [-Wstringop-truncation]
strncpy((char *) ha->nvram->bios_high, ha->bios_version, 4);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ips.c:5628:2: warning: âstrncpyâ specified bound 4 equals destination size [-Wstringop-truncation]
strncpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/scsi/3w-sas.o
drivers/scsi/3w-sas.c: In function âtwl_reset_sequenceâ:
drivers/scsi/3w-sas.c:1328:3: warning: âstrncpyâ output truncated before terminating nul copying 11 bytes from a string of the same length [-Wstringop-truncation]
strncpy(tw_dev->tw_compat_info.driver_version, TW_DRIVER_VERSION, strlen(TW_DRIVER_VERSION));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/staging/ks7010/ks_wlan_net.o
drivers/staging/ks7010/ks_wlan_net.c: In function âks_wlan_get_nickâ:
drivers/staging/ks7010/ks_wlan_net.c:385:2: warning: âstrncpyâ output may be truncated copying 16 bytes from a string of length 32 [-Wstringop-truncation]
strncpy(extra, priv->nick, 16);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/staging/rtl8188eu/os_dep/ioctl_linux.o
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c: In function ârtw_wx_set_enc_extâ:
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:1923:2: warning: âstrncpyâ specified bound 16 equals destination size [-Wstringop-truncation]
strncpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/staging/rtl8192e/rtllib_softmac.o
In function ârtllib_softmac_new_netâ,
inlined from ârtllib_softmac_check_all_netsâ at drivers/staging/rtl8192e/rtllib_softmac.c:1772:4:
drivers/staging/rtl8192e/rtllib_softmac.c:1687:5: warning: âstrncpyâ output may be truncated copying 32 bytes from a string of length 32 [-Wstringop-truncation]
strncpy(tmp_ssid, ieee->current_network.ssid,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IW_ESSID_MAX_SIZE);
~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8192e/rtllib_softmac.c:1694:5: warning: âstrncpyâ output may be truncated copying 32 bytes from a string of length 32 [-Wstringop-truncation]
strncpy(ieee->current_network.ssid, tmp_ssid,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IW_ESSID_MAX_SIZE);
~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8192e/rtllib_softmac.c: In function ârtllib_softmac_new_netâ:
drivers/staging/rtl8192e/rtllib_softmac.c:1687:5: warning: âstrncpyâ output may be truncated copying 32 bytes from a string of length 32 [-Wstringop-truncation]
strncpy(tmp_ssid, ieee->current_network.ssid,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IW_ESSID_MAX_SIZE);
~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8192e/rtllib_softmac.c:1694:5: warning: âstrncpyâ output may be truncated copying 32 bytes from a string of length 32 [-Wstringop-truncation]
strncpy(ieee->current_network.ssid, tmp_ssid,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IW_ESSID_MAX_SIZE);
~~~~~~~~~~~~~~~~~~

CC [M] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.o
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c: In function âieee80211_softmac_new_netâ:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1463:6: warning: âstrncpyâ output may be truncated copying 32 bytes from a string of length 32 [-Wstringop-truncation]
strncpy(tmp_ssid, ieee->current_network.ssid, IW_ESSID_MAX_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1468:5: warning: âstrncpyâ output may be truncated copying 32 bytes from a string of length 32 [-Wstringop-truncation]
strncpy(ieee->current_network.ssid, tmp_ssid, IW_ESSID_MAX_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function âieee80211_softmac_new_netâ,
inlined from âieee80211_softmac_check_all_netsâ at drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1531:4:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1463:6: warning: âstrncpyâ output may be truncated copying 32 bytes from a string of length 32 [-Wstringop-truncation]
strncpy(tmp_ssid, ieee->current_network.ssid, IW_ESSID_MAX_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1468:5: warning: âstrncpyâ output may be truncated copying 32 bytes from a string of length 32 [-Wstringop-truncation]
strncpy(ieee->current_network.ssid, tmp_ssid, IW_ESSID_MAX_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/staging/rtl8712/rtl871x_ioctl_linux.o
drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function âr871x_wx_set_enc_extâ:
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1792:2: warning: âstrncpyâ specified bound 16 equals destination size [-Wstringop-truncation]
strncpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/staging/rts5208/rtsx_scsi.o
In function âinquiryâ,
inlined from ârtsx_scsi_handlerâ at drivers/staging/rts5208/rtsx_scsi.c:3477:12:
drivers/staging/rts5208/rtsx_scsi.c:539:3: warning: âstrncpyâ output truncated copying 28 bytes from a string of length 29 [-Wstringop-truncation]
strncpy(buf + 8, inquiry_string, sendbytes - 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/rts5208/rtsx_scsi.c:539:3: warning: âstrncpyâ output truncated copying between 1 and 27 bytes from a string of length 29 [-Wstringop-truncation]
CC [M] drivers/staging/speakup/kobjects.o
drivers/staging/speakup/kobjects.c: In function âpunc_storeâ:
drivers/staging/speakup/kobjects.c:522:2: warning: âstrncpyâ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(punc_buf, buf, x);
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/speakup/kobjects.c:504:6: note: length computed here
x = strlen(buf);
^~~~~~~~~~~
drivers/staging/speakup/kobjects.c: In function âsynth_storeâ:
drivers/staging/speakup/kobjects.c:391:2: warning: âstrncpyâ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(new_synth_name, buf, len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/speakup/kobjects.c:388:8: note: length computed here
len = strlen(buf);
^~~~~~~~~~~
CC [M] drivers/tty/serial/kgdboc.o
drivers/tty/serial/kgdboc.c: In function âkgdboc_option_setup.constpropâ:
drivers/tty/serial/kgdboc.c:137:2: warning: âstrcpyâ source argument is the same as destination [-Wrestrict]
strcpy(config, opt);
^~~~~~~~~~~~~~~~~~~
CC [M] drivers/video/fbdev/uvesafb.o
drivers/video/fbdev/uvesafb.c: In function âuvesafb_vbe_getinfoâ:
drivers/video/fbdev/uvesafb.c:425:2: warning: âstrncpyâ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
strncpy(par->vbe_ib.vbe_signature, "VBE2", 4);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/fbdev/uvesafb.c: In function âv86d_storeâ:
drivers/video/fbdev/uvesafb.c:1873:2: warning: âstrncpyâ specified bound 4096 equals destination size [-Wstringop-truncation]
strncpy(v86d_path, buf, PATH_MAX);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] drivers/video/fbdev/vfb.o
CC drivers/video/hdmi.o
drivers/video/hdmi.c: In function âhdmi_spd_infoframe_initâ:
drivers/video/hdmi.c:174:2: warning: âstrncpyâ specified bound 8 equals destination size [-Wstringop-truncation]
strncpy(frame->vendor, vendor, sizeof(frame->vendor));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/hdmi.c:175:2: warning: âstrncpyâ specified bound 16 equals destination size [-Wstringop-truncation]
strncpy(frame->product, product, sizeof(frame->product));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] sound/pci/trident/trident.o
sound/pci/trident/trident.c: In function âsnd_trident_probeâ:
sound/pci/trident/trident.c:126:2: warning: âstrcatâ accessing 17 or more bytes at offsets 36 and 20 may overlap 1 byte at offset 36 [-Wrestrict]
strcat(card->shortname, card->driver);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] sound/x86/intel_hdmi_audio.o
sound/x86/intel_hdmi_audio.c: In function âhdmi_lpe_audio_probeâ:
sound/x86/intel_hdmi_audio.c:1857:3: warning: âstrncpyâ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(pcm->name, card->shortname, strlen(card->shortname));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] net/core/pktgen.o
net/core/pktgen.c: In function âpktgen_if_writeâ:
net/core/pktgen.c:1419:4: warning: âstrncpyâ output may be truncated copying between 0 and 31 bytes from a string of length 127 [-Wstringop-truncation]
strncpy(pkt_dev->src_max, buf, len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/pktgen.c:1399:4: warning: âstrncpyâ output may be truncated copying between 0 and 31 bytes from a string of length 127 [-Wstringop-truncation]
strncpy(pkt_dev->src_min, buf, len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/pktgen.c:1290:4: warning: âstrncpyâ output may be truncated copying between 0 and 31 bytes from a string of length 127 [-Wstringop-truncation]
strncpy(pkt_dev->dst_max, buf, len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/pktgen.c:1268:4: warning: âstrncpyâ output may be truncated copying between 0 and 31 bytes from a string of length 127 [-Wstringop-truncation]
strncpy(pkt_dev->dst_min, buf, len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] net/netfilter/ipset/ip_set_core.o
net/netfilter/ipset/ip_set_core.c: In function âip_set_renameâ:
net/netfilter/ipset/ip_set_core.c:1170:2: warning: âstrncpyâ specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(set->name, name2, IPSET_MAXNAMELEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC lib/kobject.o
In function âfill_kobj_pathâ,
inlined from âkobject_get_pathâ at lib/kobject.c:155:2:
lib/kobject.c:128:3: warning: âstrncpyâ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(path + length, kobject_name(parent), cur);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/kobject.c: In function âkobject_get_pathâ:
lib/kobject.c:125:13: note: length computed here
int cur = strlen(kobject_name(parent));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
HOSTCC scripts/unifdef
scripts/unifdef.c: In function âMpassâ:
scripts/unifdef.c:453:28: warning: âstrncpyâ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~