Warning: excess elements in array initializer
Warning the array Initial Value Setting item contains redundant elements (the defined array length is smaller than the number of values assigned)
/* Global processing character mode. The default character */static char * g_echo_flag_show [echo_chg_max] = {"min", "NONE", "No chg", "upper ", "lower", "Max"};/* Conversion Mode */typedef Enum {echo_chg_min,/* invalid value */echo_chg_none,/* No Conversion Mode Set */echo_chg_nochg, /* No conversion, direct return */echo_chg_upper,/* To uppercase letters */echo_chg_lower,/* to lowercase letters */echo_chg_max/* invalid value */} echo_chg_type;
Echo_chg_max is used as the last enumeration and the value is 5. Therefore, the array length is g_echo_flag_show [5], but the assigned value contains 6 strings, so a warning is reported.
Change
Static char * g_echo_flag_show [echo_chg_max + 1] = {"min", "NONE", "No chg", "upper", "lower", "Max "};