summaryrefslogtreecommitdiff
path: root/regress/libexec/ld.so
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-08-07 16:33:53 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-08-07 16:33:53 +0000
commitc74baac1ad89d8d9eabede65ca33b7e50ff1e920 (patch)
treef1a9df1fd63399bcc92c5b4246dd529315f5738f /regress/libexec/ld.so
parent2b3effc9e98586ddc93d804f5f3a7fedae6fd2c5 (diff)
Silence most clang warnings in ld.so regress.
OK kettenis@
Diffstat (limited to 'regress/libexec/ld.so')
-rw-r--r--regress/libexec/ld.so/constructor/libaa/aa.C4
-rw-r--r--regress/libexec/ld.so/constructor/libaa/aa.h2
-rw-r--r--regress/libexec/ld.so/constructor/libab/ab.C4
-rw-r--r--regress/libexec/ld.so/constructor/libab/ab.h4
-rw-r--r--regress/libexec/ld.so/edgecases/test1/libaa_b/aa.c5
-rw-r--r--regress/libexec/ld.so/edgecases/test1/libaa_g/aa.c5
-rw-r--r--regress/libexec/ld.so/hidden/test1/test1.c3
-rw-r--r--regress/libexec/ld.so/hidden/test2/test2.c4
-rw-r--r--regress/libexec/ld.so/lazy/libfoo/foo.c4
9 files changed, 19 insertions, 16 deletions
diff --git a/regress/libexec/ld.so/constructor/libaa/aa.C b/regress/libexec/ld.so/constructor/libaa/aa.C
index 524b0f49c28..6d319e2839b 100644
--- a/regress/libexec/ld.so/constructor/libaa/aa.C
+++ b/regress/libexec/ld.so/constructor/libaa/aa.C
@@ -1,14 +1,14 @@
/*
* Public Domain 2003 Dale Rahn
*
- * $OpenBSD: aa.C,v 1.3 2017/08/04 18:23:52 kettenis Exp $
+ * $OpenBSD: aa.C,v 1.4 2017/08/07 16:33:52 bluhm Exp $
*/
#include "aa.h"
volatile int a;
-AA::AA(char *arg)
+AA::AA(const char *arg)
{
a = 1;
}
diff --git a/regress/libexec/ld.so/constructor/libaa/aa.h b/regress/libexec/ld.so/constructor/libaa/aa.h
index 1df8304849f..e6d2533c0c7 100644
--- a/regress/libexec/ld.so/constructor/libaa/aa.h
+++ b/regress/libexec/ld.so/constructor/libaa/aa.h
@@ -1,6 +1,6 @@
class AA {
public:
- AA(char *);
+ AA(const char *);
};
diff --git a/regress/libexec/ld.so/constructor/libab/ab.C b/regress/libexec/ld.so/constructor/libab/ab.C
index 757502e5940..20082e73e41 100644
--- a/regress/libexec/ld.so/constructor/libab/ab.C
+++ b/regress/libexec/ld.so/constructor/libab/ab.C
@@ -1,7 +1,7 @@
/*
* Public Domain 2003 Dale Rahn
*
- * $OpenBSD: ab.C,v 1.4 2017/02/25 07:28:32 jsg Exp $
+ * $OpenBSD: ab.C,v 1.5 2017/08/07 16:33:52 bluhm Exp $
*/
#include <cstdlib>
@@ -13,7 +13,7 @@ using namespace std;
extern int a;
-BB::BB(char *str)
+BB::BB(const char *str)
{
if (a == 0) {
cout << "A not initialized in B constructors " << a << "\n";
diff --git a/regress/libexec/ld.so/constructor/libab/ab.h b/regress/libexec/ld.so/constructor/libab/ab.h
index cdb01ad3884..72e40ce1251 100644
--- a/regress/libexec/ld.so/constructor/libab/ab.h
+++ b/regress/libexec/ld.so/constructor/libab/ab.h
@@ -1,11 +1,11 @@
/*
* Public Domain 2003 Dale Rahn
*
- * $OpenBSD: ab.h,v 1.1 2003/02/01 19:56:17 drahn Exp $
+ * $OpenBSD: ab.h,v 1.2 2017/08/07 16:33:52 bluhm Exp $
*/
class BB {
public:
- BB(char *);
+ BB(const char *);
};
diff --git a/regress/libexec/ld.so/edgecases/test1/libaa_b/aa.c b/regress/libexec/ld.so/edgecases/test1/libaa_b/aa.c
index 59755f1db6f..45301f58ab5 100644
--- a/regress/libexec/ld.so/edgecases/test1/libaa_b/aa.c
+++ b/regress/libexec/ld.so/edgecases/test1/libaa_b/aa.c
@@ -1,6 +1,7 @@
-/* $OpenBSD: aa.c,v 1.2 2015/01/20 04:41:01 krw Exp $ */
+/* $OpenBSD: aa.c,v 1.3 2017/08/07 16:33:52 bluhm Exp $ */
/* the point of this library is to not define function ad() */
-ad_notdefine()
+void
+ad_notdefine(void)
{
}
/*
diff --git a/regress/libexec/ld.so/edgecases/test1/libaa_g/aa.c b/regress/libexec/ld.so/edgecases/test1/libaa_g/aa.c
index 45c1a959a54..640fe9cb083 100644
--- a/regress/libexec/ld.so/edgecases/test1/libaa_g/aa.c
+++ b/regress/libexec/ld.so/edgecases/test1/libaa_g/aa.c
@@ -1,5 +1,6 @@
-/* $OpenBSD: aa.c,v 1.2 2015/01/20 04:41:01 krw Exp $ */
-ad()
+/* $OpenBSD: aa.c,v 1.3 2017/08/07 16:33:52 bluhm Exp $ */
+void
+ad(void)
{
}
int libglobal;
diff --git a/regress/libexec/ld.so/hidden/test1/test1.c b/regress/libexec/ld.so/hidden/test1/test1.c
index 31ac3dccc3a..151bc8e3a02 100644
--- a/regress/libexec/ld.so/hidden/test1/test1.c
+++ b/regress/libexec/ld.so/hidden/test1/test1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test1.c,v 1.2 2007/08/01 12:53:28 kurt Exp $ */
+/* $OpenBSD: test1.c,v 1.3 2017/08/07 16:33:52 bluhm Exp $ */
/*
* Copyright (c) 2007 Kurt Miller <kurt@openbsd.org>
@@ -31,7 +31,6 @@ main()
{
void *libaa, *libab;
void (*hidden_test)();
- int i;
libaa = dlopen(LIBAA, RTLD_LAZY);
libab = dlopen(LIBAB, RTLD_LAZY);
diff --git a/regress/libexec/ld.so/hidden/test2/test2.c b/regress/libexec/ld.so/hidden/test2/test2.c
index f450e3ef33d..52642357f9d 100644
--- a/regress/libexec/ld.so/hidden/test2/test2.c
+++ b/regress/libexec/ld.so/hidden/test2/test2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test2.c,v 1.2 2007/08/01 12:53:28 kurt Exp $ */
+/* $OpenBSD: test2.c,v 1.3 2017/08/07 16:33:52 bluhm Exp $ */
/*
* Copyright (c) 2007 Kurt Miller <kurt@openbsd.org>
@@ -27,7 +27,7 @@ void *libaa_hidden_val = NULL;
void *libab_hidden_val = NULL;
extern void test_aa(void);
-extern void test_bb(void);
+extern void test_ab(void);
int
main()
diff --git a/regress/libexec/ld.so/lazy/libfoo/foo.c b/regress/libexec/ld.so/lazy/libfoo/foo.c
index 0286bd3eae2..bf82a8572bc 100644
--- a/regress/libexec/ld.so/lazy/libfoo/foo.c
+++ b/regress/libexec/ld.so/lazy/libfoo/foo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: foo.c,v 1.2 2017/02/25 07:28:32 jsg Exp $ */
+/* $OpenBSD: foo.c,v 1.3 2017/08/07 16:33:52 bluhm Exp $ */
/* Public domain. 2008, Matthieu Herrb */
#include <dlfcn.h>
@@ -7,6 +7,8 @@
static void *h = NULL;
+extern int bar(void);
+
void
foo_init(void)
{