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:
Pádraig Brady committed 2017-03-26 15:20:26 -07:00
1 parent 0839e6d8d9
commit 8e7bcdd806
1 file changed
+2
+2
View File
@@ -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));