mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Fix warnings. Better error message for missing -c argument.
This commit is contained in:
@ -1,8 +1,10 @@
|
|||||||
/*@group*/
|
/*@group*/
|
||||||
#include <unistd.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
int aflag = 0;
|
int aflag = 0;
|
||||||
@ -28,7 +30,9 @@ main (int argc, char **argv)
|
|||||||
cvalue = optarg;
|
cvalue = optarg;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
if (isprint (optopt))
|
if (optopt == 'c')
|
||||||
|
fprintf (stderr, "Option -%c requires an argument.\n", optopt);
|
||||||
|
else if (isprint (optopt))
|
||||||
fprintf (stderr, "Unknown option `-%c'.\n", optopt);
|
fprintf (stderr, "Unknown option `-%c'.\n", optopt);
|
||||||
else
|
else
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
|
Reference in New Issue
Block a user