Skip to content

Instantly share code, notes, and snippets.

@gahr
Created November 21, 2023 14:34
Show Gist options
  • Save gahr/59e770127e5be9ab0f75554eb6bcdc29 to your computer and use it in GitHub Desktop.
Save gahr/59e770127e5be9ab0f75554eb6bcdc29 to your computer and use it in GitHub Desktop.
diff --git a/mutt/array.h b/mutt/array.h
index c8513d8dc..9ea8dadc7 100644
--- a/mutt/array.h
+++ b/mutt/array.h
@@ -289,10 +289,13 @@
true) \
: false)
+#ifndef __COVERITY__
+#define __coverity_escape__(x) 0
+#endif
#define ARRAY_ADD_NORESERVE(head, elem) \
((head)->capacity > (head)->size \
? (((head)->entries[(head)->size++] = (elem)), \
- true) \
- : false)
+ __coverity_escape__(elem), true) \
+ : __coverity_escape__(elem), false)
#endif /* MUTT_MUTT_ARRAY_H */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment