From 4f91e0726680b98898db16f8920420dde9d17ed8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 10 Nov 2008 20:11:27 +0100 Subject: [PATCH] compile_time_assert --- mysys/waiting_threads.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysys/waiting_threads.c b/mysys/waiting_threads.c index edabc25ee51..14b1d639d00 100644 --- a/mysys/waiting_threads.c +++ b/mysys/waiting_threads.c @@ -396,6 +396,8 @@ void wt_thd_destroy(WT_THD *thd) */ int wt_resource_id_memcmp(void *a, void *b) { + /* we use the fact that there's no padding in the middle of WT_RESOURCE_ID */ + compile_time_assert(offsetof(WT_RESOURCE_ID, type) == sizeof(ulonglong)); return memcmp(a, b, sizeof_WT_RESOURCE_ID); }