Fix redundant casts to the same type

Found using clang-tidy's google-readability-casting.
This commit is contained in:
Orestis Floros 2018-04-27 00:08:58 +03:00
parent aca7790217
commit 0b5a2092a0
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
3 changed files with 3 additions and 4 deletions

View File

@ -115,7 +115,7 @@ static void start_application(const char *command) {
setsid(); setsid();
if (fork() == 0) { if (fork() == 0) {
/* This is the child */ /* This is the child */
execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, (void *)NULL); execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, NULL);
/* not reached */ /* not reached */
} }
exit(0); exit(0);

View File

@ -83,8 +83,7 @@ xcb_char2b_t *convert_utf8_to_ucs2(char *input, size_t *real_strlen) {
} }
/* Do the conversion */ /* Do the conversion */
size_t rc = iconv(ucs2_conversion_descriptor, (char **)&input, size_t rc = iconv(ucs2_conversion_descriptor, &input, &input_size, (char **)&output, &output_size);
&input_size, (char **)&output, &output_size);
if (rc == (size_t)-1) { if (rc == (size_t)-1) {
perror("Converting to UCS-2 failed"); perror("Converting to UCS-2 failed");
free(buffer); free(buffer);

View File

@ -191,7 +191,7 @@ void start_application(const char *command, bool no_startup_id) {
if (!no_startup_id) if (!no_startup_id)
sn_launcher_context_setup_child_process(context); 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 */ /* not reached */
} }
_exit(0); _exit(0);