[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] xen: silence maybe-unitialized warning
- To: Jürgen Groß <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- Date: Mon, 29 Jul 2024 15:01:02 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=T0UZJOlVK4SzrZKcExMnE76yioHMQ14SuFpawkbHYpw=; b=UMq3uOTtzFC232UbQyXlBiEcIX22++/KG6Jf9W+CJjatjyj68wAzpztq8WSu4notLSldb8u3Gi/WyEyvLkvfCVRg5RIRfrcI5lKm/jlTcbraNFRMK/JUimlK8BJiaWhprHMbI/ekiL8dfjC43VT//NCF4QFsrWEogISIHRMDMjLsV2+Q5jwHFsLKhBeO9/LNFhO7UwXcVPho6dlC/TG+Ek+c+3omgh82+6Ht4Lty7ytZ6+9TuKpe5Wryf7OouWd6xpezSojvdif5hh9iDSpFeZUo6+U70PLubqMIc3As9ykU2qX7N2MzIWa3QflOAgCGYs5z6KN5v1zLr/umcSXfdw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XrZFI/xNlwiTl1o491HZl17zq+84zs3QAeI9HNA5hyFB0NC74Yaxr2Z2GGmPxOrqh6incdc9FdchI5SB0IMTVjri5kI1wYBchuyE99wJL2oHtcB8qhf+T16MoVM4OLRGcgWy8PCh4A+H0tEmlD7FGU8ie9ccL4hvEfvm6lY4O16RuBBDQCe6zgC1yUdTTlZjcVx8yUNNkXyXio2UvgNIPY5qE7QuuegBhQE3Xm7czsREdwTGULzsM7cPNGiEhKWMJ/DFe36TJT5ppu8Qx6Czamm7EJMwg7vA9J5bFtFqOuxeMNjrLRGd3jwBGt9TbUByh6U/z3FfYsKBA1BiIiA+QA==
- Cc: Dario Faggioli <dfaggioli@xxxxxxxx>, George Dunlap <gwd@xxxxxxxxxxxxxx>
- Delivery-date: Mon, 29 Jul 2024 19:01:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 7/29/24 11:03, Jürgen Groß wrote:
> On 29.07.24 16:24, Stewart Hildebrand wrote:
>> When building with gcc with -finstrument-functions, optimization level
>> -O1, CONFIG_HYPFS=y and # CONFIG_HAS_SCHED_GRANULARITY is not set, the
>> the following build warning (error) is encountered:
>>
>> common/sched/cpupool.c: In function ‘cpupool_gran_write’:
>> common/sched/cpupool.c:1220:26: error: ‘gran’ may be used uninitialized
>> [-Werror=maybe-uninitialized]
>> 1220 | 0 : cpupool_check_granularity(gran);
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> common/sched/cpupool.c:1207:21: note: ‘gran’ declared here
>> 1207 | enum sched_gran gran;
>> | ^~~~
>>
>> This is a false positive. Silence the warning (error) by initializing
>> the variable.
>>
>> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
>
> Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
Thanks!
It just occurred to me: should the subject prefix be xen/cpupool:
instead of plain xen: ?
|