From 0b5a2092a08f7e4463b5d52e11d84750af84e73c Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Fri, 27 Apr 2018 00:08:58 +0300 Subject: [PATCH] Fix redundant casts to the same type Found using clang-tidy's google-readability-casting. --- i3-nagbar/main.c | 2 +- libi3/ucs2_conversion.c | 3 +-- src/startup.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/i3-nagbar/main.c b/i3-nagbar/main.c index e4628e30..3e5f43e3 100644 --- a/i3-nagbar/main.c +++ b/i3-nagbar/main.c @@ -115,7 +115,7 @@ static void start_application(const char *command) { setsid(); if (fork() == 0) { /* This is the child */ - execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, (void *)NULL); + execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, NULL); /* not reached */ } exit(0); diff --git a/libi3/ucs2_conversion.c b/libi3/ucs2_conversion.c index 75cff78a..398c1ae5 100644 --- a/libi3/ucs2_conversion.c +++ b/libi3/ucs2_conversion.c @@ -83,8 +83,7 @@ xcb_char2b_t *convert_utf8_to_ucs2(char *input, size_t *real_strlen) { } /* Do the conversion */ - size_t rc = iconv(ucs2_conversion_descriptor, (char **)&input, - &input_size, (char **)&output, &output_size); + size_t rc = iconv(ucs2_conversion_descriptor, &input, &input_size, (char **)&output, &output_size); if (rc == (size_t)-1) { perror("Converting to UCS-2 failed"); free(buffer); diff --git a/src/startup.c b/src/startup.c index 1e733fcb..b1a2f602 100644 --- a/src/startup.c +++ b/src/startup.c @@ -191,7 +191,7 @@ void start_application(const char *command, bool no_startup_id) { if (!no_startup_id) sn_launcher_context_setup_child_process(context); - execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, (void *)NULL); + execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, NULL); /* not reached */ } _exit(0); -- 2.39.5