Mercurial > vim
comparison src/message.c @ 27426:41e0dcf38521 v8.2.4241
patch 8.2.4241: some type casts are redundant
Commit: https://github.com/vim/vim/commit/420fabcd4ffeaf79082a6e43db91e1d363f88f27
Author: =?UTF-8?q?Dundar=20G=C3=B6c?= <gocdundar@gmail.com>
Date: Fri Jan 28 15:28:04 2022 +0000
patch 8.2.4241: some type casts are redundant
Problem: Some type casts are redundant.
Solution: Remove the type casts. (closes https://github.com/vim/vim/issues/9643)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 28 Jan 2022 16:30:11 +0100 |
parents | 8c43e3d1a6e5 |
children | 6ca2d8f4cd32 |
comparison
equal
deleted
inserted
replaced
27425:b5bd6c851b8a | 27426:41e0dcf38521 |
---|---|
162 add_msg_hist((char_u *)s, -1, attr); | 162 add_msg_hist((char_u *)s, -1, attr); |
163 | 163 |
164 #ifdef FEAT_JOB_CHANNEL | 164 #ifdef FEAT_JOB_CHANNEL |
165 if (emsg_to_channel_log) | 165 if (emsg_to_channel_log) |
166 // Write message in the channel log. | 166 // Write message in the channel log. |
167 ch_log(NULL, "ERROR: %s", (char *)s); | 167 ch_log(NULL, "ERROR: %s", s); |
168 #endif | 168 #endif |
169 | 169 |
170 // Truncate the message if needed. | 170 // Truncate the message if needed. |
171 msg_start(); | 171 msg_start(); |
172 buf = msg_strtrunc((char_u *)s, FALSE); | 172 buf = msg_strtrunc((char_u *)s, FALSE); |
903 * Give an error message which contains %s for "name[len]". | 903 * Give an error message which contains %s for "name[len]". |
904 */ | 904 */ |
905 void | 905 void |
906 emsg_namelen(char *msg, char_u *name, int len) | 906 emsg_namelen(char *msg, char_u *name, int len) |
907 { | 907 { |
908 char_u *copy = vim_strnsave((char_u *)name, len); | 908 char_u *copy = vim_strnsave(name, len); |
909 | 909 |
910 semsg(msg, copy == NULL ? "NULL" : (char *)copy); | 910 semsg(msg, copy == NULL ? "NULL" : (char *)copy); |
911 vim_free(copy); | 911 vim_free(copy); |
912 } | 912 } |
913 #endif | 913 #endif |
3699 { | 3699 { |
3700 if (IObuff == NULL) | 3700 if (IObuff == NULL) |
3701 { | 3701 { |
3702 // Very early in initialisation and already something wrong, just give | 3702 // Very early in initialisation and already something wrong, just give |
3703 // the raw message so the user at least gets a hint. | 3703 // the raw message so the user at least gets a hint. |
3704 give_warning((char_u *)message, hl); | 3704 give_warning(message, hl); |
3705 } | 3705 } |
3706 else | 3706 else |
3707 { | 3707 { |
3708 vim_snprintf((char *)IObuff, IOSIZE, (char *)message, a1); | 3708 vim_snprintf((char *)IObuff, IOSIZE, (char *)message, a1); |
3709 give_warning(IObuff, hl); | 3709 give_warning(IObuff, hl); |