Projects
Factory:RISC-V:Base
util-linux
_service:tar_scm:backport-wdctl-mark-flags-fiel...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-wdctl-mark-flags-field-as-unsigned-long.patch of Package util-linux
From f36f3251c564991070c6b2c2347a999a56564e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de> Date: Sun, 8 Jan 2023 03:29:51 +0000 Subject: [PATCH] wdctl: mark flags field as unsigned long This is required by string_to_bitmask(). The previous cast failed on s390x with the following warning: In function 'string_to_bitmask', inlined from 'string_to_bitmask' at lib/strutils.c:802:5, inlined from 'main' at sys-utils/wdctl.c:770:8: lib/strutils.c:829:23: error: write of 64-bit data outside the bound of destination object, data truncated into 32-bit [-Werror=extra] 829 | *mask |= flag; | --- sys-utils/wdctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys-utils/wdctl.c b/sys-utils/wdctl.c index 8de5d5a..f0d2e8d 100644 --- a/sys-utils/wdctl.c +++ b/sys-utils/wdctl.c @@ -592,7 +592,7 @@ int main(int argc, char *argv[]) struct wd_device wd; struct wd_control ctl = { .hide_headings = 0 }; int c, res = EXIT_SUCCESS, count = 0; - uint32_t wanted = 0; + unsigned long wanted = 0; int timeout = 0; const char *dflt_device = NULL; @@ -640,7 +640,7 @@ int main(int argc, char *argv[]) timeout = strtos32_or_err(optarg, _("invalid timeout argument")); break; case 'f': - if (string_to_bitmask(optarg, (unsigned long *) &wanted, name2bit) != 0) + if (string_to_bitmask(optarg, &wanted, name2bit) != 0) return EXIT_FAILURE; break; case 'F': -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2