From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> Unknown option fallbacks to '?' case. Keep the assert(optarg) for scan-build. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1477322 Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> --- src/vscclient.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vscclient.c b/src/vscclient.c index 0954b3f..fa60162 100644 --- a/src/vscclient.c +++ b/src/vscclient.c @@ -679,8 +679,11 @@ main( #endif while ((c = getopt(argc, argv, "c:e:d:")) != -1) { - assert(optarg != NULL); + if (c == '?') { + break; + } + assert(optarg != NULL); switch (c) { case 'c': if (cert_count >= MAX_CERTS) { -- 2.14.0.rc0.1.g40ca67566 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel