aboutsummaryrefslogtreecommitdiff
path: root/ccan
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2017-07-18 13:44:42 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-19 15:49:39 +1000
commitdc2f7ebfdf889ea97857fa32405040ea845505bf (patch)
tree4763ce37ab6fc9a17eade3640d7b743ba41f8a53 /ccan
parent36698d130b522d99437c07b24124ca30a94deea8 (diff)
downloadskiboot-dc2f7ebfdf889ea97857fa32405040ea845505bf.zip
skiboot-dc2f7ebfdf889ea97857fa32405040ea845505bf.tar.gz
skiboot-dc2f7ebfdf889ea97857fa32405040ea845505bf.tar.bz2
attrconst for tests
Fixes build warnings when running with higher optimization than -O0 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'ccan')
-rw-r--r--ccan/array_size/test/run.c2
-rw-r--r--ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c2
-rw-r--r--ccan/check_type/test/run.c2
-rw-r--r--ccan/container_of/test/run.c2
-rw-r--r--ccan/short_types/test/run-endian.c2
-rw-r--r--ccan/short_types/test/run.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/ccan/array_size/test/run.c b/ccan/array_size/test/run.c
index 284e315..a17f045 100644
--- a/ccan/array_size/test/run.c
+++ b/ccan/array_size/test/run.c
@@ -16,7 +16,7 @@ static int array2_size = ARRAY_SIZE(array2);
static int array3_size = ARRAY_SIZE(array3);
static int array4_size = ARRAY_SIZE(array4);
-int main(int argc, char *argv[])
+int __attribute__((const)) main(int argc, char *argv[])
{
(void)argc;
(void)argv;
diff --git a/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c b/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c
index 55e6f3c..77bf94c 100644
--- a/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c
+++ b/ccan/build_assert/test/run-BUILD_ASSERT_OR_ZERO.c
@@ -1,7 +1,7 @@
#include <ccan/build_assert/build_assert.h>
#include <ccan/tap/tap.h>
-int main(int argc, char *argv[])
+int __attribute__((const)) main(int argc, char *argv[])
{
(void)argc;
(void)argv;
diff --git a/ccan/check_type/test/run.c b/ccan/check_type/test/run.c
index 767c9fd..be0e246 100644
--- a/ccan/check_type/test/run.c
+++ b/ccan/check_type/test/run.c
@@ -1,7 +1,7 @@
#include <ccan/check_type/check_type.h>
#include <ccan/tap/tap.h>
-int main(int argc, char *argv[])
+int __attribute__((const)) main(int argc, char *argv[])
{
int x = 0, y = 0;
diff --git a/ccan/container_of/test/run.c b/ccan/container_of/test/run.c
index 9e51b0d..2bd6947 100644
--- a/ccan/container_of/test/run.c
+++ b/ccan/container_of/test/run.c
@@ -6,7 +6,7 @@ struct foo {
char b;
};
-int main(int argc, char *argv[])
+int __attribute__((const)) main(int argc, char *argv[])
{
struct foo foo = { .a = 1, .b = 2 };
int *intp = &foo.a;
diff --git a/ccan/short_types/test/run-endian.c b/ccan/short_types/test/run-endian.c
index 108e3ab..d8953a3 100644
--- a/ccan/short_types/test/run-endian.c
+++ b/ccan/short_types/test/run-endian.c
@@ -4,7 +4,7 @@
#include <stdlib.h>
#include <err.h>
-int main(void)
+int __attribute__((const)) main(void)
{
plan_tests(6);
diff --git a/ccan/short_types/test/run.c b/ccan/short_types/test/run.c
index 2bff4b7..ac8b31b 100644
--- a/ccan/short_types/test/run.c
+++ b/ccan/short_types/test/run.c
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <err.h>
-int main(void)
+int __attribute__((const)) main(void)
{
plan_tests(16);