From: Andre Noll Date: Tue, 14 Nov 2017 02:14:47 +0000 (+0100) Subject: Silence a bogus scan-build warning. X-Git-Tag: v1.0.0~5 X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=commitdiff_plain;h=006e53e5e4503defd5555522f6b38417faed451b Silence a bogus scan-build warning. We never pass a NULL pointer to create_snapshot(), but scan-build is unable to prove this and claims that the array access results in a null pointer dereference. The added assertion helps the reader of the code, and it quietens scan-build. --- diff --git a/dss.c b/dss.c index a782a2e..ffbf500 100644 --- a/dss.c +++ b/dss.c @@ -1448,6 +1448,7 @@ static int create_snapshot(char **argv) { int ret; + assert(argv); ret = rename_resume_snap(current_snapshot_creation_time); if (ret < 0) return ret;