diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-21 23:51:38 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-23 13:56:38 -0700 |
commit | 0615af6f4748e4f7dc6a4f034a9db636742cc3bd (patch) | |
tree | a0c09720ca4c8670869b56d03e57431b46073f75 /cmd | |
parent | 3064cb13577edd31d3a3ceb79b2bc72314ec208b (diff) |
Use C23 (C++11) attribute syntax instead of __attribute__
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/sbc_harness/config/tusb_config.h | 6 | ||||
-rw-r--r-- | cmd/sbc_harness/usb_keyboard.c | 2 | ||||
-rw-r--r-- | cmd/srv9p/main.c | 2 | ||||
-rw-r--r-- | cmd/srv9p/static9p.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/cmd/sbc_harness/config/tusb_config.h b/cmd/sbc_harness/config/tusb_config.h index aeff31c..fc963ac 100644 --- a/cmd/sbc_harness/config/tusb_config.h +++ b/cmd/sbc_harness/config/tusb_config.h @@ -66,10 +66,10 @@ extern "C" { // Tinyusb use follows macros to declare transferring memory so that they can be put // into those specific section. // e.g -// - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") )) -// - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4))) +// - CFG_TUSB_MEM SECTION : [[gnu::section(".usb_ram")]] +// - CFG_TUSB_MEM_ALIGN : [[gnu::aligned(4)]] #define CFG_TUSB_MEM_SECTION /* blank */ -#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4))) +#define CFG_TUSB_MEM_ALIGN [[gnu::aligned(4)]] #define CFG_TUD_ENABLED 1 #define CFG_TUD_MAX_SPEED BOARD_TUD_MAX_SPEED diff --git a/cmd/sbc_harness/usb_keyboard.c b/cmd/sbc_harness/usb_keyboard.c index 3500e31..637921e 100644 --- a/cmd/sbc_harness/usb_keyboard.c +++ b/cmd/sbc_harness/usb_keyboard.c @@ -11,7 +11,7 @@ #include "usb_keyboard.h" -#define UNUSED(name) /* name __attribute__ ((unused)) */ +#define UNUSED(name) /** * A USB-HID "Report Descriptor" (see USB-HID 1.11 ยง6.2.2 "Report diff --git a/cmd/srv9p/main.c b/cmd/srv9p/main.c index be34daa..05368e5 100644 --- a/cmd/srv9p/main.c +++ b/cmd/srv9p/main.c @@ -25,7 +25,7 @@ /* implementation *************************************************************/ -#define UNUSED(name) /* name __attribute__((unused)) */ +#define UNUSED(name) /* file tree ******************************************************************/ diff --git a/cmd/srv9p/static9p.c b/cmd/srv9p/static9p.c index 90f3856..b5b18e0 100644 --- a/cmd/srv9p/static9p.c +++ b/cmd/srv9p/static9p.c @@ -9,7 +9,7 @@ #include "static9p.h" -#define UNUSED(name) /* name __attribute__((unused)) */ +#define UNUSED(name) #define p9_str(cstr) ((struct lib9p_s){ .len = strlen(cstr), .utf8 = cstr }) #define p9_nulstr ((struct lib9p_s){ .len = 0, .utf8 = NULL }) |