Projects
Eulaceura:Factory
grubby
_service:obs_scm:backport-Fix-maybe-uninitializ...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:backport-Fix-maybe-uninitialized-warning.patch of Package grubby
From 99d10a31cee89eb45ac0743f484018d36500ce66 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas <javierm@redhat.com> Date: Mon, 10 Feb 2020 20:08:42 +0100 Subject: [PATCH] Fix maybe-uninitialized warning GCC gives the following compile warning: grubby.c: In function 'suseGrubConfGetBoot': grubby.c:2770:5: error: 'grubDevice' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2770 | free(grubDevice); | ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [Makefile:38: grubby.o] Error 1 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> --- grubby.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grubby.c b/grubby.c index 5de935d..74befea 100644 --- a/grubby.c +++ b/grubby.c @@ -2896,7 +2896,7 @@ int grubGetBootFromDeviceMap(const char * device, } int suseGrubConfGetBoot(const char * path, char ** bootPtr) { - char * grubDevice; + char * grubDevice = NULL; if (suseGrubConfGetInstallDevice(path, &grubDevice)) dbgPrintf("error looking for grub installation device\n"); -- 1.8.3.1
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