From 717ea53c803a1cd7ae24589fb10bf794e422d38f Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Sun, 12 Jun 2016 13:45:54 +0800 Subject: [PATCH] Add static keyword for IsValidVariableHeader() GCC does not inline any functions when not optimizing (-O0 specified) unless you specify "always_inline" attribute for the function. By default, GCC complies with C89 standard for c code, which means "inline" equals to "extern inline" and thus the definition is used only for inlining with the assembly code actually generated. Therefore, "static inline" is used for both purposes. If -O0 is specified, GCC will generate the assembly code as long as the function is referred. Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Lans Zhang --- include/variableformat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/variableformat.h b/include/variableformat.h index 32cde05..45d0ebb 100644 --- a/include/variableformat.h +++ b/include/variableformat.h @@ -109,7 +109,7 @@ typedef struct { #pragma pack() -inline BOOLEAN +static inline BOOLEAN IsValidVariableHeader (VARIABLE_HEADER *vh) { if (vh == NULL || vh->StartId != VARIABLE_DATA) return FALSE; -- 2.25.1