Skip to content

Commit bd88104

Browse files
authored
Merge ff1c6aa into dafb6aa
2 parents dafb6aa + ff1c6aa commit bd88104

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pvtoolsSrc/pvget.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@ int MAIN (int argc, char *argv[])
276276

277277
// ================ Parse Arguments
278278

279+
if(argc <= optind){
280+
/* No arguments specified */
281+
fprintf(stderr, "No arguments specified. Please use " EXECNAME" -h for help");
282+
return 1;
283+
}
284+
279285
while ((opt = getopt(argc, argv, ":hvVRM:r:w:tmp:qdcF:f:ni")) != -1) {
280286
switch (opt) {
281287
case 'h': /* Print usage */
@@ -361,6 +367,9 @@ int MAIN (int argc, char *argv[])
361367
optopt);
362368
return 1;
363369
default :
370+
fprintf(stderr,
371+
"Option '-%c' is not supported - it is a valid option but is not implemented. \n",
372+
optopt);
364373
usage();
365374
return 1;
366375
}

0 commit comments

Comments
 (0)