pkarashchenko commented on a change in pull request #5495:
URL: https://github.com/apache/incubator-nuttx/pull/5495#discussion_r806175553
##########
File path: tools/jlink-nuttx.c
##########
@@ -72,7 +72,7 @@ enum symbol_e
NSYMBOLS
};
-__attribute__ ((packed)) struct tcbinfo_s
+struct __attribute__ ((packed)) tcbinfo_s
Review comment:
Let's do either
```
struct tcbinfo_s __attribute__ ((packed))
```
or
```
struct tcbinfo_s
{
} __attribute__ ((packed));
```
I prefer second variant.
Also seems that
```
union
{
uint8_t u[8];
uint16_t *p;
} reg_off;
```
is missing packed attribute as well.
It should be
```
struct tcbinfo_s
{
uint16_t pid_off;
uint16_t state_off;
uint16_t pri_off;
uint16_t name_off;
uint16_t reg_num;
union
{
uint8_t u[8];
uint16_t *p;
} __attribute__ ((packed)) reg_off;
uint16_t reg_offs[0];
} __attribute__ ((packed));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]