mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
PVS/V1032: pointer cast to a more strictly aligned type
This commit is contained in:
parent
ed171f7be2
commit
ea7491586f
@ -4895,7 +4895,7 @@ int find_help_tags(const char_u *arg, int *num_matches, char_u ***matches,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*matches = (char_u **)"";
|
*matches = &vim_emptystr;
|
||||||
*num_matches = 0;
|
*num_matches = 0;
|
||||||
int flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE;
|
int flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE;
|
||||||
if (keep_lang) {
|
if (keep_lang) {
|
||||||
|
@ -4702,7 +4702,7 @@ ExpandFromContext (
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
*file = (char_u **)"";
|
*file = &vim_emptystr;
|
||||||
*num_file = 0;
|
*num_file = 0;
|
||||||
if (xp->xp_context == EXPAND_HELP) {
|
if (xp->xp_context == EXPAND_HELP) {
|
||||||
/* With an empty argument we would get all the help tags, which is
|
/* With an empty argument we would get all the help tags, which is
|
||||||
|
@ -1072,17 +1072,18 @@ EXTERN char_u e_cmdmap_key[] INIT(=N_(
|
|||||||
EXTERN char top_bot_msg[] INIT(= N_("search hit TOP, continuing at BOTTOM"));
|
EXTERN char top_bot_msg[] INIT(= N_("search hit TOP, continuing at BOTTOM"));
|
||||||
EXTERN char bot_top_msg[] INIT(= N_("search hit BOTTOM, continuing at TOP"));
|
EXTERN char bot_top_msg[] INIT(= N_("search hit BOTTOM, continuing at TOP"));
|
||||||
|
|
||||||
/* For undo we need to know the lowest time possible. */
|
// For undo we need to know the lowest time possible.
|
||||||
EXTERN time_t starttime;
|
EXTERN time_t starttime;
|
||||||
|
|
||||||
EXTERN FILE *time_fd INIT(= NULL); /* where to write startup timing */
|
EXTERN FILE *time_fd INIT(= NULL); /* where to write startup timing */
|
||||||
|
|
||||||
/*
|
// Some compilers warn for not using a return value, but in some situations we
|
||||||
* Some compilers warn for not using a return value, but in some situations we
|
// can't do anything useful with the value. Assign to this variable to avoid
|
||||||
* can't do anything useful with the value. Assign to this variable to avoid
|
// the warning.
|
||||||
* the warning.
|
|
||||||
*/
|
|
||||||
EXTERN int vim_ignored;
|
EXTERN int vim_ignored;
|
||||||
|
// Use this to avoid PVS warning V1032 for code like this:
|
||||||
|
// *foo = (char_u **)"";
|
||||||
|
EXTERN char_u *vim_emptystr INIT(= (char_u *)"");
|
||||||
|
|
||||||
// Start a msgpack-rpc channel over stdin/stdout.
|
// Start a msgpack-rpc channel over stdin/stdout.
|
||||||
EXTERN bool embedded_mode INIT(= false);
|
EXTERN bool embedded_mode INIT(= false);
|
||||||
|
@ -1267,7 +1267,7 @@ int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
*num_file = ga.ga_len;
|
*num_file = ga.ga_len;
|
||||||
*file = (ga.ga_data != NULL) ? (char_u **)ga.ga_data : (char_u **)"";
|
*file = (ga.ga_data != NULL) ? (char_u **)ga.ga_data : &vim_emptystr;
|
||||||
|
|
||||||
recursive = false;
|
recursive = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user