let clang give more warnings (which pointed out a bug)
diff --git a/aos/linux_code/starter/starter.cc b/aos/linux_code/starter/starter.cc
index 363ca46..114148f 100644
--- a/aos/linux_code/starter/starter.cc
+++ b/aos/linux_code/starter/starter.cc
@@ -211,7 +211,7 @@
notifyevt = reinterpret_cast<inotify_event *>(
__builtin_assume_aligned(reinterpret_cast<char *>(notifyevt) +
sizeof(*notifyevt) + notifyevt->len,
- alignof(notifyevt)));
+ alignof(inotify_event)));
}
}
diff --git a/bbb_cape/src/bbb/packet_finder.h b/bbb_cape/src/bbb/packet_finder.h
index 2ad230b..9aa0eeb 100644
--- a/bbb_cape/src/bbb/packet_finder.h
+++ b/bbb_cape/src/bbb/packet_finder.h
@@ -31,7 +31,7 @@
// pointed to is undefined.
template <typename T>
const T *get_packet() {
- static_assert(alignof(T) <= alignof(*unstuffed_data_),
+ static_assert(alignof(T) <= alignof(AlignedChar),
"We need to align our data better.");
CHECK(sizeof(T) <= packet_size_ - 8);
return reinterpret_cast<const T *>(unstuffed_data_);