Closed vmihalko closed 1 year ago
Merges private-vmihalko-fix-uninitialized-pointer -> master
The following warning occurs during the build* process:
[71/82] Compiling C object src/programs/pkexec.p/pkexec.c.o ../src/programs/pkexec.c: In function ‘main’: ../src/programs/pkexec.c:805:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 805 | gchar *cmdline_short = NULL; | ^~~~~ ../src/programs/pkexec.c:1074:3: warning: ‘cmdline_short’ may be used uninitialized [-Wmaybe-uninitialized] 1074 | g_free (cmdline_short); | ^~~~~~~~~~~~~~~~~~~~~~ ../src/programs/pkexec.c:805:10: note: ‘cmdline_short’ was declared here 805 | gchar *cmdline_short = NULL; | ^~~~~~~~~~~~~
This commit changes the local variable cmdline_short to a global variable and fixes the above warning.
cmdline_short
* build process:
$ meson setup build; meson compile -C build
Fixes https://gitlab.freedesktop.org/polkit/polkit/-/issues/201 (uninitialized pointer warning)
added 1 commit
Compare with previous version
In GitLab by @jrybar on Aug 16, 2023, 10:50
enabled an automatic merge when the pipeline for f7ed531e16e38474d33d1bd3fb5166ec2093700c succeeds
Merges private-vmihalko-fix-uninitialized-pointer -> master
Summary
The following warning occurs during the build* process:
This commit changes the local variable
cmdline_short
to a global variable and fixes the above warning.* build process:
Fixes https://gitlab.freedesktop.org/polkit/polkit/-/issues/201 (uninitialized pointer warning)