[PATCH] regnual: remove duplicate type declaration
Bertrand Jacquin
bertrand at jacquin.bzh
Sat Mar 26 21:26:14 CET 2022
In file included from regnual.c:31:
types.h:1:23: error: conflicting types for ‘size_t’; have ‘long unsigned int’
1 | typedef unsigned long size_t;
| ^~~~~~
In file included from /usr/arm-none-eabi/include/sys/reent.h:14,
from /usr/arm-none-eabi/include/string.h:11,
from regnual.c:29:
/usr/lib/gcc/arm-none-eabi/11.2.1/include/stddef.h:209:23: note: previous declaration of ‘size_t’ with type ‘size_t’ {aka ‘unsigned int’}
209 | typedef __SIZE_TYPE__ size_t;
|
---
regnual/regnual.c | 2 --
regnual/types.h | 4 ----
2 files changed, 6 deletions(-)
diff --git a/regnual/regnual.c b/regnual/regnual.c
index e296d51bc53e..fbc6064874ac 100644
--- a/regnual/regnual.c
+++ b/regnual/regnual.c
@@ -32,8 +32,6 @@
#include "usb_lld.h"
#include "sys.h"
-extern void *memset (void *s, int c, size_t n);
-
extern void set_led (int);
extern int flash_write (uint32_t dst_addr, const uint8_t *src, size_t len);
extern int flash_protect (void);
diff --git a/regnual/types.h b/regnual/types.h
index 6527e0ba206c..0f70f97d0556 100644
--- a/regnual/types.h
+++ b/regnual/types.h
@@ -1,5 +1,3 @@
-typedef unsigned long size_t;
-
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
@@ -7,5 +5,3 @@ typedef unsigned int uintptr_t;
#define TRUE 1
#define FALSE 0
-
-#define NULL 0
More information about the Gnuk-users
mailing list