[llvm-c] Make LLVMGetStringErrorTypeId a proper prototype
authorAnders Waldenborg <anders@0x63.nu>
Mon, 6 May 2019 06:42:06 +0000 (06:42 +0000)
committerAnders Waldenborg <anders@0x63.nu>
Mon, 6 May 2019 06:42:06 +0000 (06:42 +0000)
In C a function declaration with an empty argument list isn't a real
prototype, it will allow calling the function with any number of
arguments. It will also cause warnings when used in C code compiled with
'-Wstrict-prototypes'

Reviewed By: whitequark
Differential Revision: https://reviews.llvm.org/D61568

llvm-svn: 360012

llvm/include/llvm-c/Error.h

index 40ea1fb..5294306 100644 (file)
@@ -60,7 +60,7 @@ void LLVMDisposeErrorMessage(char *ErrMsg);
 /**
  * Returns the type id for llvm StringError.
  */
-LLVMErrorTypeId LLVMGetStringErrorTypeId();
+LLVMErrorTypeId LLVMGetStringErrorTypeId(void);
 
 #ifdef __cplusplus
 }