[PATCH 01/13] format-check: void * is not OK for strings, fix the test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 validation/varargs-format-addrspace1.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/validation/varargs-format-addrspace1.c b/validation/varargs-format-addrspace1.c
index 3370ac67849c..53c210b78ae0 100644
--- a/validation/varargs-format-addrspace1.c
+++ b/validation/varargs-format-addrspace1.c
@@ -4,8 +4,8 @@ extern int variadic2(char *msg, int , ...) __attribute__((format (printf, 1, 3))
 extern int variadic3(int, char *msg,  ...) __attribute__((format (printf, 2, 3)));
 
 static void test(void) {
-	void __attribute__((noderef, address_space(1))) *a;
-	void *b;
+	const char __attribute__((noderef, address_space(1))) *a;
+	const char *b;
 
 	variadic("%s\n", a);
 	variadic("%s\n", b);
@@ -22,15 +22,15 @@ static void test(void) {
  * check-error-start
 varargs-format-addrspace1.c:10:26: warning: incorrect type in argument 2 (different address spaces)
 varargs-format-addrspace1.c:10:26:    expected char const *
-varargs-format-addrspace1.c:10:26:    got void [noderef] <asn:1> *a
+varargs-format-addrspace1.c:10:26:    got char const [noderef] <asn:1> *a
 varargs-format-addrspace1.c:12:32: warning: incorrect type in argument 3 (different address spaces)
 varargs-format-addrspace1.c:12:32:    expected char const *
-varargs-format-addrspace1.c:12:32:    got void [noderef] <asn:1> *a
+varargs-format-addrspace1.c:12:32:    got char const [noderef] <asn:1> *a
 varargs-format-addrspace1.c:13:36: warning: incorrect type in argument 4 (different address spaces)
 varargs-format-addrspace1.c:13:36:    expected char const *
-varargs-format-addrspace1.c:13:36:    got void [noderef] <asn:1> *a
+varargs-format-addrspace1.c:13:36:    got char const [noderef] <asn:1> *a
 varargs-format-addrspace1.c:14:36: warning: incorrect type in argument 4 (different address spaces)
 varargs-format-addrspace1.c:14:36:    expected char const *
-varargs-format-addrspace1.c:14:36:    got void [noderef] <asn:1> *a
+varargs-format-addrspace1.c:14:36:    got char const [noderef] <asn:1> *a
  * check-error-end
  */
-- 
2.28.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux