[PATCH] D135230: Fix warnings in build done by clang-based compiler

Pavel Chupin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 17:13:46 PDT 2022


pavel.v.chupin created this revision.
pavel.v.chupin added a reviewer: andrew.w.kaylor.
Herald added a subscriber: hiraditya.
Herald added a project: All.
pavel.v.chupin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

warning: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]


https://reviews.llvm.org/D135230

Files:
  llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.c


Index: llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.c
===================================================================
--- llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.c
+++ llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.c
@@ -258,7 +258,7 @@
  * This function allows the user to query in which mode, if at all, 
  *VTune is running
  */
-ITT_EXTERN_C iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive()
+ITT_EXTERN_C iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive(void)
 {
     if (!iJIT_DLL_is_missing)
     {
@@ -273,7 +273,7 @@
  * on success: all functions load,     iJIT_DLL_is_missing = 0, return value = 1
  * on failure: all functions are NULL, iJIT_DLL_is_missing = 1, return value = 0
  */ 
-static int loadiJIT_Funcs()
+static int loadiJIT_Funcs(void)
 {
     static int bDllWasLoaded = 0;
     char *dllName = (char*)rcsid; /* !! Just to avoid unused code elimination */
@@ -416,7 +416,7 @@
  * This function should be called by the user whenever a thread ends, 
  * to free the thread "virtual stack" storage
  */
-ITT_EXTERN_C void JITAPI FinalizeThread()
+ITT_EXTERN_C void JITAPI FinalizeThread(void)
 {
     if (threadLocalStorageHandle)
     {
@@ -444,7 +444,7 @@
  * This function should be called by the user when the process ends, 
  * to free the local storage index
 */
-ITT_EXTERN_C void JITAPI FinalizeProcess()
+ITT_EXTERN_C void JITAPI FinalizeProcess(void)
 {
     if (m_libHandle) 
     {
@@ -469,7 +469,7 @@
  * The function will return a unique method ID, the user should maintain 
  * the ID for each method
  */
-ITT_EXTERN_C unsigned int JITAPI iJIT_GetNewMethodID()
+ITT_EXTERN_C unsigned int JITAPI iJIT_GetNewMethodID(void)
 {
     static unsigned int methodID = 0x100000;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135230.465229.patch
Type: text/x-patch
Size: 1757 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221005/09127f85/attachment.bin>


More information about the llvm-commits mailing list