@pmatilai commented on this pull request.


> +    rpmRC rc = RPMRC_FAIL;
+
+    /* XXX Skip valid arch check if not building binary package */
+    if (!(spec->flags & RPMSPEC_ANYARCH) && checkForValidArchitectures(spec)) {
+       goto exit;
+    }
+
+    fillOutMainPackage(spec->packages->header);
+    /* Define group tag to something when group is undefined in main package*/
+    if (!headerIsEntry(spec->packages->header, RPMTAG_GROUP)) {
+       headerPutString(spec->packages->header, RPMTAG_GROUP, "Unspecified");
+    }
+
+    char *platform = rpmExpand("%{_target_platform}", NULL);
+    char *os = rpmExpand("%{_target_os}", NULL);
+    char *optflags = rpmExpand("%{optflags}", NULL);

These are still causing the warnings I mentioned earlier:

```
/home/pmatilai/repos/rpm/build/parseSpec.c: In function ‘finalizeSpec’:
/home/pmatilai/repos/rpm/build/parseSpec.c:1160:5: warning: ‘platform’ may be 
used uninitialized [-Wmaybe-uninitialized]
 1160 |     free(platform);
      |     ^~~~~~~~~~~~~~
/home/pmatilai/repos/rpm/build/parseSpec.c:1121:11: note: ‘platform’ was 
declared here
 1121 |     char *platform = rpmExpand("%{_target_platform}", NULL);
      |           ^~~~~~~~
/home/pmatilai/repos/rpm/build/parseSpec.c:1161:5: warning: ‘os’ may be used 
uninitialized [-Wmaybe-uninitialized]
 1161 |     free(os);
      |     ^~~~~~~~
/home/pmatilai/repos/rpm/build/parseSpec.c:1122:11: note: ‘os’ was declared here
 1122 |     char *os = rpmExpand("%{_target_os}", NULL);
      |           ^~
/home/pmatilai/repos/rpm/build/parseSpec.c:1162:5: warning: ‘optflags’ may be 
used uninitialized [-Wmaybe-uninitialized]
 1162 |     free(optflags);
      |     ^~~~~~~~~~~~~~
/home/pmatilai/repos/rpm/build/parseSpec.c:1123:11: note: ‘optflags’ was 
declared here
 1123 |     char *optflags = rpmExpand("%{optflags}", NULL);
      |           ^~~~~~~~
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2646#pullrequestreview-1667419879
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2646/review/1667419...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to