public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] MdeModulePkg RegularExpressionDxe: Add the missing EFIAPI for the function
@ 2016-10-09  2:36 Liming Gao
  2016-10-12  8:09 ` Tian, Feng
  0 siblings, 1 reply; 2+ messages in thread
From: Liming Gao @ 2016-10-09  2:36 UTC (permalink / raw)
  To: edk2-devel; +Cc: Feng Tian, Cinnamon Shia, Cecil Sheng

The function with the variable parameters should have EFIAPI.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Cinnamon Shia <cinnamon.shia@hpe.com>
Cc: Cecil Sheng <cecil.sheng@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 .../Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c        | 2 +-
 .../Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.h        | 2 +-
 MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/oniguruma.h       | 2 +-
 MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regerror.c        | 2 ++
 MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h          | 2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c
index aaa5d3d..b4a9adf 100644
--- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c
+++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c
@@ -14,7 +14,7 @@
 **/
 #include "OnigurumaUefiPort.h"
 
-int sprintf_s(char *str, size_t sizeOfBuffer, char const *fmt, ...)
+int EFIAPI sprintf_s(char *str, size_t sizeOfBuffer, char const *fmt, ...)
 {
   VA_LIST Marker;
   int   NumberOfPrinted;
diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.h b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.h
index ca478de..d24ac1d 100644
--- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.h
+++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.h
@@ -69,7 +69,7 @@ typedef UINTN size_t;
 
 int OnigStrCmp (char* Str1, char* Str2);
 
-int sprintf_s (char *str, size_t sizeOfBuffer, char const *fmt, ...);
+int EFIAPI sprintf_s (char *str, size_t sizeOfBuffer, char const *fmt, ...);
 
 #define exit(n) ASSERT(FALSE);
 
diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/oniguruma.h b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/oniguruma.h
index 034a2cc..462565a 100644
--- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/oniguruma.h
+++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/oniguruma.h
@@ -719,7 +719,7 @@ typedef struct {
 ONIG_EXTERN
 int onig_init P_((void));
 ONIG_EXTERN
-int onig_error_code_to_str PV_((OnigUChar* s, int err_code, ...));
+int EFIAPI onig_error_code_to_str PV_((OnigUChar* s, int err_code, ...));
 ONIG_EXTERN
 void onig_set_warn_func P_((OnigWarnFunc f));
 ONIG_EXTERN
diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regerror.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regerror.c
index fbc764a..1544e23 100644
--- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regerror.c
+++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regerror.c
@@ -252,6 +252,7 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
 #define MAX_ERROR_PAR_LEN   30
 
 extern int
+EFIAPI
 #ifdef HAVE_STDARG_PROTOTYPES
 onig_error_code_to_str(UChar* s, int code, ...)
 #else
@@ -324,6 +325,7 @@ onig_error_code_to_str(s, code, va_alist)
 
 
 void
+EFIAPI
 #ifdef HAVE_STDARG_PROTOTYPES
 onig_snprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
                            UChar* pat, UChar* pat_end, const UChar *fmt, ...)
diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h
index f48c557..d5b3089 100644
--- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h
+++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h
@@ -781,7 +781,7 @@ extern void onig_print_statistics P_((FILE* f));
 #endif
 
 extern UChar* onig_error_code_to_format P_((int code));
-extern void  onig_snprintf_with_pattern PV_((UChar buf[], int bufsize, OnigEncoding enc, UChar* pat, UChar* pat_end, const UChar *fmt, ...));
+extern void EFIAPI onig_snprintf_with_pattern PV_((UChar buf[], int bufsize, OnigEncoding enc, UChar* pat, UChar* pat_end, const UChar *fmt, ...));
 extern int  onig_bbuf_init P_((BBuf* buf, int size));
 extern int  onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo));
 extern void onig_chain_reduce P_((regex_t* reg));
-- 
2.8.0.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-12  8:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-09  2:36 [Patch] MdeModulePkg RegularExpressionDxe: Add the missing EFIAPI for the function Liming Gao
2016-10-12  8:09 ` Tian, Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox