efl src - mark fallthrough switch statements in 3rd party code
in code we importend that doesnt use eina we have warnings of fallthroughs. all o them are commented to be fallthrough so add the attribute there too to have fewer warnings.
This commit is contained in:
parent
12278d27de
commit
932ae95a4e
|
@ -3136,7 +3136,13 @@ get_directive_token(cpp_reader * pfile)
|
|||
case CPP_POP:
|
||||
if (!CPP_IS_MACRO_BUFFER(CPP_BUFFER(pfile)))
|
||||
return token;
|
||||
/* ... else fall though ... */
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if __has_attribute(fallthrough)
|
||||
__attribute__((fallthrough));
|
||||
#endif
|
||||
/* ... else fall though ... */
|
||||
case CPP_HSPACE:
|
||||
case CPP_COMMENT:
|
||||
CPP_SET_WRITTEN(pfile, old_written);
|
||||
|
@ -4300,6 +4306,12 @@ skip_if_group(cpp_reader * pfile, int any)
|
|||
validate_else(pfile,
|
||||
kt->type ==
|
||||
T_ELSE ? "#else" : "#endif");
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if __has_attribute(fallthrough)
|
||||
__attribute__((fallthrough));
|
||||
#endif
|
||||
/* this fall through is intened */
|
||||
case T_ELIF:
|
||||
if (pfile->if_stack == CPP_BUFFER(pfile)->if_stack)
|
||||
|
@ -6748,7 +6760,14 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv)
|
|||
{
|
||||
opts->out_fname = "";
|
||||
break;
|
||||
} /* else fall through into error */
|
||||
}
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if __has_attribute(fallthrough)
|
||||
__attribute__((fallthrough));
|
||||
#endif
|
||||
/* else fall through into error */
|
||||
default:
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -2119,6 +2119,12 @@ http_parser_parse_url(const char *buf, size_t buflen, int is_connect,
|
|||
case s_req_server_with_at:
|
||||
found_at = 1;
|
||||
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if __has_attribute(fallthrough)
|
||||
__attribute__((fallthrough));
|
||||
#endif
|
||||
/* FALLTROUGH */
|
||||
case s_req_server:
|
||||
uf = UF_HOST;
|
||||
|
|
|
@ -210,7 +210,13 @@ static void set_wordbreaks(
|
|||
posLast = posCur;
|
||||
break;
|
||||
}
|
||||
/* Fall off */
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if __has_attribute(fallthrough)
|
||||
__attribute__((fallthrough));
|
||||
#endif
|
||||
/* Fall off */
|
||||
|
||||
case WBP_Newline:
|
||||
/* WB3a,3b */
|
||||
|
@ -323,7 +329,13 @@ static void set_wordbreaks(
|
|||
wbcSeqStart = wbcCur;
|
||||
posLast = posCur;
|
||||
}
|
||||
/* No break on purpose */
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if __has_attribute(fallthrough)
|
||||
__attribute__((fallthrough));
|
||||
#endif
|
||||
/* No break on purpose */
|
||||
case WBP_MidNumLet:
|
||||
if (((wbcLast == WBP_ALetter) ||
|
||||
(wbcLast == WBP_Hebrew_Letter)) || /* WB6,7 */
|
||||
|
|
Loading…
Reference in New Issue