]> granicus.if.org Git - llvm/commitdiff
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360012 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm-c/Error.h

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