From: Alex Colomar Date: Mon, 12 Sep 2022 16:54:07 +0000 (+0200) Subject: Various pages: EXAMPLES: Remove unused variables X-Git-Tag: man-pages-6.00~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1e39c1e280c308f0549393fe4f48b5429a55f07;p=thirdparty%2Fman-pages.git Various pages: EXAMPLES: Remove unused variables Reported-by: clang-tidy(1) Signed-off-by: Alex Colomar --- diff --git a/man3/dl_iterate_phdr.3 b/man3/dl_iterate_phdr.3 index 031b861e76..717f25027d 100644 --- a/man3/dl_iterate_phdr.3 +++ b/man3/dl_iterate_phdr.3 @@ -328,7 +328,7 @@ callback(struct dl_phdr_info *info, size_t size, void *data) } int -main(int argc, char *argv[]) +main(void) { dl_iterate_phdr(callback, NULL); diff --git a/man3/get_nprocs_conf.3 b/man3/get_nprocs_conf.3 index 03e2d04e25..2a63595bc1 100644 --- a/man3/get_nprocs_conf.3 +++ b/man3/get_nprocs_conf.3 @@ -82,7 +82,7 @@ can be used. #include int -main(int argc, char *argv[]) +main(void) { printf("This system has %d processors configured and " "%d processors available.\en", diff --git a/man3/getutent.3 b/man3/getutent.3 index 1aeb09bb42..39338e628c 100644 --- a/man3/getutent.3 +++ b/man3/getutent.3 @@ -303,7 +303,7 @@ and #include int -main(int argc, char *argv[]) +main(void) { struct utmp entry; diff --git a/man3/gnu_get_libc_version.3 b/man3/gnu_get_libc_version.3 index 83e4c07ecd..c6340fddab 100644 --- a/man3/gnu_get_libc_version.3 +++ b/man3/gnu_get_libc_version.3 @@ -69,7 +69,7 @@ GNU libc release: stable #include int -main(int argc, char *argv[]) +main(void) { printf("GNU libc version: %s\en", gnu_get_libc_version()); printf("GNU libc release: %s\en", gnu_get_libc_release()); diff --git a/man3/mcheck.3 b/man3/mcheck.3 index 88c4da3e8a..19f0719747 100644 --- a/man3/mcheck.3 +++ b/man3/mcheck.3 @@ -186,7 +186,7 @@ Aborted (core dumped) #include int -main(int argc, char *argv[]) +main(void) { char *p; diff --git a/man3/mtrace.3 b/man3/mtrace.3 index 19bcacdd80..a7cb6176b8 100644 --- a/man3/mtrace.3 +++ b/man3/mtrace.3 @@ -133,7 +133,7 @@ The demonstration uses the following program: #include int -main(int argc, char *argv[]) +main(void) { mtrace(); diff --git a/man3/pthread_cleanup_push.3 b/man3/pthread_cleanup_push.3 index 1cb1e52fef..7246f5a266 100644 --- a/man3/pthread_cleanup_push.3 +++ b/man3/pthread_cleanup_push.3 @@ -254,13 +254,13 @@ cleanup_handler(void *arg) static void * thread_start(void *arg) { - time_t start, curr; + time_t curr; printf("New thread started\en"); pthread_cleanup_push(cleanup_handler, NULL); - curr = start = time(NULL); + curr = time(NULL); while (!done) { pthread_testcancel(); /* A cancelation point */ diff --git a/man3/pthread_getattr_default_np.3 b/man3/pthread_getattr_default_np.3 index 8b752aecb0..0c46ee4d55 100644 --- a/man3/pthread_getattr_default_np.3 +++ b/man3/pthread_getattr_default_np.3 @@ -164,7 +164,7 @@ display_pthread_attr(pthread_attr_t *attr) } int -main(int argc, char *argv[]) +main(void) { int s; pthread_attr_t attr; diff --git a/man3/pthread_getcpuclockid.3 b/man3/pthread_getcpuclockid.3 index 76cbe05631..669ce2255c 100644 --- a/man3/pthread_getcpuclockid.3 +++ b/man3/pthread_getcpuclockid.3 @@ -135,7 +135,7 @@ pclock(char *msg, clockid_t cid) } int -main(int argc, char *argv[]) +main(void) { pthread_t thread; clockid_t cid; diff --git a/man3/pthread_mutexattr_setrobust.3 b/man3/pthread_mutexattr_setrobust.3 index eedfe1801f..e0c9b99223 100644 --- a/man3/pthread_mutexattr_setrobust.3 +++ b/man3/pthread_mutexattr_setrobust.3 @@ -213,7 +213,7 @@ original_owner_thread(void *ptr) } int -main(int argc, char *argv[]) +main(void) { pthread_t thr; pthread_mutexattr_t attr; diff --git a/man3/pthread_setaffinity_np.3 b/man3/pthread_setaffinity_np.3 index 3d252c0753..f6cbc97576 100644 --- a/man3/pthread_setaffinity_np.3 +++ b/man3/pthread_setaffinity_np.3 @@ -167,7 +167,7 @@ to check the resulting CPU affinity mask of the thread. do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) int -main(int argc, char *argv[]) +main(void) { int s; cpu_set_t cpuset; diff --git a/man3/pthread_sigmask.3 b/man3/pthread_sigmask.3 index 45d7f4cc70..1d4feae5ea 100644 --- a/man3/pthread_sigmask.3 +++ b/man3/pthread_sigmask.3 @@ -123,7 +123,7 @@ sig_thread(void *arg) } int -main(int argc, char *argv[]) +main(void) { pthread_t thread; sigset_t set; diff --git a/man3/strcat.3 b/man3/strcat.3 index befd989bb0..b44208a45b 100644 --- a/man3/strcat.3 +++ b/man3/strcat.3 @@ -199,7 +199,7 @@ will provide better performance.) #include int -main(int argc, char *argv[]) +main(void) { #define LIM 4000000 char p[LIM + 1]; /* +1 for terminating null byte */