mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
maint: avoid a static analysis warning in expand-common
* src/expand-common.c (next_file): We're dependent on calling this function with NULL to initialize things appropriately. So enforce this with assert(), which avoids a warning from clang-anaylzer.
This commit is contained in:
1 parent
0839e6d8d9
commit
8e7bcdd806
1 file changed
+2
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "system.h"
|
||||
@@ -282,6 +283,7 @@ next_file (FILE *fp)
|
||||
|
||||
if (fp)
|
||||
{
|
||||
assert (prev_file);
|
||||
if (ferror (fp))
|
||||
{
|
||||
error (0, errno, "%s", quotef (prev_file));
|
||||
|
||||
Reference in new issue
Block a user