Fix some static analysis issues

This commit is contained in:
Justine Tunney 2024-07-27 09:16:54 -07:00
parent fb54604b31
commit f147d3dde9
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
30 changed files with 375 additions and 266 deletions

View file

@ -367,6 +367,24 @@ typedef struct {
#define offsetof(type, member) __builtin_offsetof(type, member)
#if defined(__GNUC__) && __GNUC__ >= 10
#define __read_only(...) __attribute__((__access__(__read_only__, __VA_ARGS__)))
#define __write_only(...) \
__attribute__((__access__(__write_only__, __VA_ARGS__)))
#define __read_write(...) \
__attribute__((__access__(__read_write__, __VA_ARGS__)))
#else
#define __read_only(...)
#define __write_only(...)
#define __read_write(...)
#endif
#if defined(__GNUC__) && __GNUC__ >= 13
#define __fd_arg(N) __attribute__((__fd_arg__(N)))
#else
#define __fd_arg(N)
#endif
#ifdef _COSMO_SOURCE
#ifndef dontinstrument