mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 06:07:34 +02:00
PlowRandom.c: warning: variable 'f2' is used uninitialized
PlowRandom.c:301:9: warning: variable 'f2' is used uninitialized whenever 'if' condition is true clang18 -Wall warning cleanup [-Wsometimes-uninitialized]
This commit is contained in:
committed by
Tim Edwards
parent
4206ed2436
commit
3919cc5b63
+5
-3
@@ -294,7 +294,7 @@ plowFileDiff(file1, file2)
|
||||
char *file2;
|
||||
{
|
||||
char b1[BUFSIZ], b2[BUFSIZ];
|
||||
int f1, f2;
|
||||
int f1 = -1, f2 = -1;
|
||||
int n1, n2;
|
||||
bool ret = FALSE;
|
||||
|
||||
@@ -310,7 +310,9 @@ plowFileDiff(file1, file2)
|
||||
ret = TRUE;
|
||||
|
||||
done:
|
||||
(void) close(f1);
|
||||
(void) close(f2);
|
||||
if (f1 >= 0)
|
||||
(void) close(f1);
|
||||
if (f2 >= 0)
|
||||
(void) close(f2);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user