commit | 2f0a6d034c1fe9c6ecd844e8cd42449073c91a98 | [log] [tgz] |
---|---|---|
author | Patrick Williams <patrick@stwcx.xyz> | Thu Aug 17 12:54:08 2023 -0500 |
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | Wed Aug 23 23:30:22 2023 +0000 |
tree | 1a06b7716996414317eea56739a3a8402d8db182 | |
parent | c2c26f93c5867db65ab91fed40b71867195ce506 [diff] |
sensorcommands: avoid stringop-truncation warning When compiling ipmi-fru-parser with GCC 13.2.0, I observed the following: ``` ../subprojects/phosphor-host-ipmid/dbus-sdr/sensorcommands.cpp:1748:17: error: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 16 equals destination size [-Werror=stringop-truncation] 1748 | std::strncpy(record.body.id_string, name.c_str(), ``` Switch to a memcpy instead of a strncpy to avoid the warning. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I43d5cddd74cf1ad2d686e9529e87ec416e2bb6a0
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in ipmid/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage