Author | Jamozed <[email protected]> |
Date | 2020-07-09 10:11:16 |
Commit | b634f01c8e1611ea6faf2efe3980549747f33a98 |
Parent | ee5817c1ee64348f64c3849a8edba07ddd06820d |
logname: Fix unused parameter warning
Diffstat
M | src/logname.c | | | 5 | ++--- |
M | src/pwd.c | | | 2 | +- |
M | src/time.c | | | 2 | +- |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/logname.c b/src/logname.c index 9ddfeba..5e5bb86 100644 --- a/src/logname.c +++ b/src/logname.c @@ -23,9 +23,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. #include <stdio.h> -int main(int ac, char *av[]) { (void)ac; +int main(void) { register char *login = getlogin(); if (!login) { error(1, "%s", serr()); } - else { fputs(login, stdout); fputc('\n', stdout); } - return 0; + else { puts(login); } return 0; } diff --git a/src/pwd.c b/src/pwd.c index 333c682..d8f72c5 100644 --- a/src/pwd.c +++ b/src/pwd.c @@ -49,7 +49,7 @@ static int mode = 0; static void help(void); static void version(void); -int main(int ac, char *av[]) { A0 = av[0]; +int main(int ac, char *av[]) { (void)ac; A0 = av[0]; lop_t lops[] = { { "help", ARG_NUL, 256 }, { "version", ARG_NUL, 257 }, diff --git a/src/time.c b/src/time.c index 8dce209..9cd63b9 100644 --- a/src/time.c +++ b/src/time.c @@ -53,7 +53,7 @@ static bool pflag; static inline void help(void); static inline void version(void); -int main(int ac, char *av[]) { A0 = av[0]; +int main(int ac, char *av[]) { (void)ac; A0 = av[0]; lop_t lops[] = { { "help", ARG_NUL, 256 }, { "version", ARG_NUL, 257 },