From: Antonio Ospite Date: Thu, 10 May 2012 10:10:45 +0000 (+0200) Subject: picoproj: issue a warning when passing "-f" more than once X-Git-Tag: v0.1.3~37^2~5 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/e2c8afa72334152016d1344217839abe54718a77?ds=inline picoproj: issue a warning when passing "-f" more than once --- diff --git a/examples/picoproj.c b/examples/picoproj.c index a44a266..e18cc7d 100644 --- a/examples/picoproj.c +++ b/examples/picoproj.c @@ -74,6 +74,8 @@ int main(int argc, char *argv[]) while ((opt = getopt(argc, argv, "f:F:l:p:W:H:h")) != -1) { switch (opt) { case 'f': + if (filename[0] != '\0') + fprintf(stderr, "Warning: image file already specified\n"); strncpy(filename, optarg, FILENAME_MAX); break; case 'F':