tweaks: correct a parameter type, and correct two empty initializations

This avoids some warnings when compiled with -pedantic:

    ISO C forbids comparison of ‘void *’ with function pointer
    ISO C forbids empty initializer braces
master
David Lawrence Ramsey 2017-07-01 23:07:54 -05:00 committed by Benno Schulenberg
parent 1c05090a4a
commit 6295cca03b
2 changed files with 3 additions and 3 deletions

View File

@ -227,10 +227,10 @@ regmatch_t regmatches[10];
int hilite_attribute = A_REVERSE;
/* The curses attribute we use to highlight something. */
#ifndef DISABLE_COLOR
char* specified_color_combo[] = {};
char* specified_color_combo[] = {'\0'};
/* The color combinations as specified in the rcfile. */
#endif
int interface_color_pair[] = {};
int interface_color_pair[] = {0};
/* The processed color pairs for the interface elements. */
char *homedir = NULL;

View File

@ -350,7 +350,7 @@ void parse_syntax(char *ptr)
/* Check whether the given executable function is "universal" (meaning
* any horizontal movement or deletion) and thus is present in almost
* all menus. */
bool is_universal(void (*func))
bool is_universal(void (*func)(void))
{
if (func == do_left || func == do_right ||
func == do_home_void || func == do_end_void ||