Bug 12496

Summary: Backend ALPM Fails to compile
Product: PackageKit Reporter: Harley Laue <losinggeneration>
Component: GeneralAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: medium CC: ken.vandine
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch that was in the description.

Description Harley Laue 2007-09-19 17:09:07 UTC
Due to a compiler warning, ALPM fails to compile. It's because when PkPackageId *id is initialized, it's with the declaration. Thus, GCC thinks id is unused.

Below is the git diff since I don't see how to add a patch file:
diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c
index 95e6d30..c23a4e5 100644
--- a/backends/alpm/pk-backend-alpm.c
+++ b/backends/alpm/pk-backend-alpm.c
@@ -392,7 +392,8 @@ static void
 backend_get_description (PkBackend *backend, const gchar *package_id)
 {
        g_return_if_fail (backend != NULL);
-       PkPackageId *id = pk_package_id_new_from_string (package_id);
+       PkPackageId *id;
+       id = pk_package_id_new_from_string (package_id);
        //pk_backend_description (backend, package_id, "unknown", PK_GROUP_ENUM_PROGRAMMING, "sdgd");
        pk_backend_finished (backend);
 }
Comment 1 Harley Laue 2007-09-19 17:12:19 UTC
Created attachment 11651 [details] [review]
Patch that was in the description.
Comment 2 Ken VanDine 2007-10-12 04:00:16 UTC
Is this still an issue?
Comment 3 Richard Hughes 2007-12-30 01:51:17 UTC
It should be fine now, please reopen if not the case. Thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.