mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 04:30:06 +01:00
util: annotate that our mask cannot be NULL
Poor clang-tidy thinks that there's a code-path here that lets us return with a NULL mask. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1292>
This commit is contained in:
parent
a0d286741c
commit
b831068fbb
1 changed files with 3 additions and 0 deletions
|
|
@ -265,6 +265,9 @@ _nonnull_(1) static inline void _infmask_ensure_size(infmask_t *mask, unsigned i
|
|||
mask->mask[i] = bitmask_new();
|
||||
mask->nmasks = required;
|
||||
}
|
||||
/* for clang-tidy, poor thing gets confused otherwise */
|
||||
assert(mask->mask);
|
||||
assert(mask->nmasks >= 1);
|
||||
}
|
||||
|
||||
static inline infmask_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue