Commit 2519a204 authored by Bernhard Nortmann's avatar Bernhard Nortmann
Browse files

phoenix_info: avoid -Wsometimes-uninitialized compiler warning



Just default the "out" variable in save_part() to "stdout".
Signed-off-by: default avatarBernhard Nortmann <bernhard.nortmann@web.de>
parent 217c440b
...@@ -40,7 +40,7 @@ static int save_part(struct phoenix_ptable *ptable, int part, const char *dest, ...@@ -40,7 +40,7 @@ static int save_part(struct phoenix_ptable *ptable, int part, const char *dest,
{ {
int l = strlen(dest) + 16; int l = strlen(dest) + 16;
char outname[l]; char outname[l];
FILE *out; FILE *out = stdout;
char *buf = NULL; char *buf = NULL;
int ret = 0; int ret = 0;
snprintf(outname, l, dest, part); snprintf(outname, l, dest, part);
...@@ -53,8 +53,6 @@ static int save_part(struct phoenix_ptable *ptable, int part, const char *dest, ...@@ -53,8 +53,6 @@ static int save_part(struct phoenix_ptable *ptable, int part, const char *dest,
goto err; goto err;
if (strcmp(outname, "-") != 0) if (strcmp(outname, "-") != 0)
out = fopen(outname, "wb"); out = fopen(outname, "wb");
else
out = stdout;
if (!out) if (!out)
goto err; goto err;
if (fseek(in, ptable->part[part].start * 0x200, SEEK_SET) == -1) if (fseek(in, ptable->part[part].start * 0x200, SEEK_SET) == -1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment