summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/staticinit.c
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2022-02-15 16:06:01 -0500
committerAaron Ballman <aaron@aaronballman.com>2022-02-15 16:06:43 -0500
commitadc402bf3d0565ac2bc7efbdd05f0d846e818041 (patch)
treea6b7b32d5fab1fec5ff57bc9a4dc177192ff241d /clang/test/CodeGen/staticinit.c
parent29a0e0a9e54f3863dd01a17552d4eda3c926b7f5 (diff)
Use functions with prototypes when appropriate; NFC
A significant number of our tests in C accidentally use functions without prototypes. This patch converts the function signatures to have a prototype for the situations where the test is not specific to K&R C declarations. e.g., void func(); becomes void func(void); This is the eleventh batch of tests being updated (there are a significant number of other tests left to be updated).
Diffstat (limited to 'clang/test/CodeGen/staticinit.c')
-rw-r--r--clang/test/CodeGen/staticinit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGen/staticinit.c b/clang/test/CodeGen/staticinit.c
index 8c5cdd05642d..04b7f85268a4 100644
--- a/clang/test/CodeGen/staticinit.c
+++ b/clang/test/CodeGen/staticinit.c
@@ -7,7 +7,7 @@ struct AStruct {
double d;
};
-void f() {
+void f(void) {
static int i = 42;
static int is[] = { 1, 2, 3, 4 };
static char* str = "forty-two";
@@ -15,7 +15,7 @@ void f() {
static struct AStruct myStruct = { 1, "two", 3.0 };
}
-void g() {
+void g(void) {
static char a[10];
static char *b = a;
}