-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize automaticly freed variables where the function could retur…
…n before the first assignment GCC 13.1.1 warned on some places like this: In file included from /usr/include/glib-2.0/glib.h:117, from ../modulemd/modulemd-translation-entry.c:14: In function ‘g_autoptr_cleanup_generic_gfree’, inlined from ‘modulemd_translation_entry_parse_yaml’ at ../modulemd/modulemd-translation-entry.c:39 8:21: /usr/include/glib-2.0/glib/glib-autocleanups.h:30:3: warning: ‘value’ may be used uninitialized [-Wmaybe-uninitialized] 30 | g_free (*pp); | ^~~~~~~~~~~~ ../modulemd/modulemd-translation-entry.c: In function ‘modulemd_translation_entry_parse_yaml’: ../modulemd/modulemd-translation-entry.c:398:21: note: ‘value’ was declared here 398 | g_autofree gchar *value; | ^~~~~ Automatic variables with a cleanup attribute are automatically deinicialized when they go out of scope, but they are not automatically initialized when defined. This patch adds the missing initialization.
- Loading branch information
Showing
4 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters