Commit a1a8ce9c authored by Dimitris Lampridis's avatar Dimitris Lampridis

sw: remove unused flags field from event/message

It's not even a documented field for WRTD messages.

Spotted during migration to gcc11.2 riscv cross compiler because in some
cases we were not initialising the flags field.
parent 8342ccb0
......@@ -381,7 +381,6 @@ static inline void zero_event(struct wrtd_event *ev)
zero_id(&ev->id);
ev->seq = 0;
ev->flags = 0;
}
static inline void copy_tstamp(struct wrtd_tstamp *dest,
......@@ -399,7 +398,6 @@ static inline void copy_event(struct wrtd_event *dest,
copy_tstamp(&dest->ts, &src->ts);
copy_id(&dest->id, &src->id);
dest->seq = src->seq;
dest->flags = src->flags;
}
/* Returns true iff L is the same id as R. */
......@@ -513,7 +511,7 @@ static int wrtd_send_network(struct wrtd_event *ev)
msg->ts_ns = ev->ts.ns;
msg->ts_frac = ev->ts.frac >> 16;
msg->ts_hi_sec = 0;
msg->flags = 0;
msg->reserved = 0;
msg->zero[0] = 0;
msg->zero[1] = 0;
msg->pad[0] = 0;
......@@ -736,8 +734,6 @@ static void wrtd_recv_network(void)
copy_id(&ev.id, (union wrtd_id*)&msg->event_id);
ev.flags = msg->flags;
mq_discard(TRTL_RMQ, WRTD_RMQ);
wrtd_log(WRTD_LOG_MSG_EV_NETWORK, WRTD_LOG_NETWORK_RX, &ev, NULL);
......
......@@ -55,9 +55,6 @@ struct wrtd_event {
/** Sequence number. */
uint32_t seq;
/** Associated flags. */
unsigned char flags;
};
inline static unsigned char wrtd_id_hash(union wrtd_id *id)
......@@ -149,7 +146,7 @@ struct wrtd_message {
uint32_t ts_ns;
uint16_t ts_frac;
uint16_t ts_hi_sec;
uint8_t flags;
uint8_t reserved;
uint8_t zero[2];
uint8_t pad[1];
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment