mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
fish: Initialize pcmd structure.
On Debian we get this warning which I'm pretty sure is bogus: fish.c:690: error: 'pcmd.cmd' may be used uninitialized in this function [-Wuninitialized]
This commit is contained in:
@@ -678,7 +678,10 @@ parse_command_line (char *buf, int *exit_on_error_rtn)
|
||||
int r;
|
||||
const size_t argv_len = sizeof pcmd.argv / sizeof pcmd.argv[0];
|
||||
|
||||
pcmd.pipe = NULL;
|
||||
/* Note that pcmd.pipe must be set to NULL for correct usage. Other
|
||||
* fields do not need to be, but this silences a gcc warning.
|
||||
*/
|
||||
memset (&pcmd, 0, sizeof pcmd);
|
||||
|
||||
again:
|
||||
/* Skip any initial whitespace before the command. */
|
||||
|
||||
Reference in New Issue
Block a user