log: use __log_buf() if we know buf != NULL
[fio.git] / optgroup.c
index 122d24e98bbb80710df3ab3a7a32e7596be71984..04ceec7ec3a7242db72bbb07349c3cbeb6695671 100644 (file)
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <inttypes.h>
 #include "optgroup.h"
+#include "compiler/compiler.h"
 
 /*
  * Option grouping
@@ -201,5 +202,8 @@ const struct opt_group *opt_group_from_mask(uint64_t *mask)
 
 const struct opt_group *opt_group_cat_from_mask(uint64_t *mask)
 {
+       compiletime_assert(__FIO_OPT_G_NR <= 8 * sizeof(uint64_t),
+                               "__FIO_OPT_G_NR");
+
        return group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
 }