Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.5
xen
xen.fa7789ef18bd2e716997937af71b2e4b5b00a159.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xen.fa7789ef18bd2e716997937af71b2e4b5b00a159.patch of Package xen
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= <marmarek@invisiblethingslab.com> Date: Thu, 5 Apr 2018 03:50:49 +0200 Subject: fa7789ef18bd2e716997937af71b2e4b5b00a159 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tools/libxc: fix strncpy size gcc-8 warns about possible truncation of trailing '\0'. Final character is overridden by '\0' anyway, so don't bother to copy it. This fixes compile failure: xc_pm.c: In function 'xc_set_cpufreq_gov': xc_pm.c:308:5: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation] strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Release-Acked-by: Juergen Gross <jgross@suse.com> --- tools/libxc/xc_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/libxc/xc_pm.c +++ b/tools/libxc/xc_pm.c @@ -289,25 +289,25 @@ unlock_1: int xc_set_cpufreq_gov(xc_interface *xch, int cpuid, char *govname) { DECLARE_SYSCTL; char *scaling_governor = sysctl.u.pm_op.u.set_gov.scaling_governor; if ( !xch || !govname ) return -EINVAL; sysctl.cmd = XEN_SYSCTL_pm_op; sysctl.u.pm_op.cmd = SET_CPUFREQ_GOV; sysctl.u.pm_op.cpuid = cpuid; - strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN); + strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN - 1); scaling_governor[CPUFREQ_NAME_LEN - 1] = '\0'; return xc_sysctl(xch, &sysctl); } int xc_set_cpufreq_para(xc_interface *xch, int cpuid, int ctrl_type, int ctrl_value) { DECLARE_SYSCTL; if ( !xch ) return -EINVAL;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor