OBS-URL: https://build.opensuse.org/package/show/science/lal?expand=0&rev=43
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From 893b1e51c2444d7ca5d87c703986541be89c5ed4 Mon Sep 17 00:00:00 2001
|
|
From: Leo Singer <leo.singer@ligo.org>
|
|
Date: Tue, 6 May 2025 13:02:34 -0400
|
|
Subject: [PATCH] Fix compiler warning on clang
|
|
|
|
Resolves the following warning, which was treated as an error:
|
|
|
|
```
|
|
CC ValueTest.o
|
|
../../../../../lal/test/tools/ValueTest.c:28:22: error: initializer-string for character array is too long, array size is 5 but initializer has size 6 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
|
|
28 | char BLOB_VALUE[5] = "\x68\x65\x6c\x6c\x6f";
|
|
| ^~~~~~~~~~~~~~~~~~~~~~
|
|
```
|
|
---
|
|
lal/test/tools/ValueTest.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/lal/test/tools/ValueTest.c b/lal/test/tools/ValueTest.c
|
|
index 2cf9d58d98..a138cc5170 100644
|
|
--- a/lal/test/tools/ValueTest.c
|
|
+++ b/lal/test/tools/ValueTest.c
|
|
@@ -25,7 +25,7 @@
|
|
#define REAL8_VALUE 1e100
|
|
#define COMPLEX8_VALUE 3.0 + 4.0 * I
|
|
#define COMPLEX16_VALUE 3e100 + 4e100 * I
|
|
-char BLOB_VALUE[5] = "\x68\x65\x6c\x6c\x6f";
|
|
+char BLOB_VALUE[5] = {'\x68', '\x65', '\x6c', '\x6c', '\x6f'};
|
|
char String_VALUE[] = "world";
|
|
|
|
static LALDict * create_dict(void)
|
|
--
|
|
GitLab
|
|
|