Merge "Nullability check for modules in include/android directory"

This commit is contained in:
Treehugger Robot 2023-04-13 18:37:42 +00:00 committed by Gerrit Code Review
commit be39cd5ebb
4 changed files with 8 additions and 8 deletions

View file

@ -157,7 +157,7 @@ typedef struct {
uint64_t flags; uint64_t flags;
/** Used by `ANDROID_DLEXT_RESERVED_ADDRESS` and `ANDROID_DLEXT_RESERVED_ADDRESS_HINT`. */ /** Used by `ANDROID_DLEXT_RESERVED_ADDRESS` and `ANDROID_DLEXT_RESERVED_ADDRESS_HINT`. */
void* reserved_addr; void* _Nullable reserved_addr;
/** Used by `ANDROID_DLEXT_RESERVED_ADDRESS` and `ANDROID_DLEXT_RESERVED_ADDRESS_HINT`. */ /** Used by `ANDROID_DLEXT_RESERVED_ADDRESS` and `ANDROID_DLEXT_RESERVED_ADDRESS_HINT`. */
size_t reserved_size; size_t reserved_size;
@ -170,7 +170,7 @@ typedef struct {
off64_t library_fd_offset; off64_t library_fd_offset;
/** Used by `ANDROID_DLEXT_USE_NAMESPACE`. */ /** Used by `ANDROID_DLEXT_USE_NAMESPACE`. */
struct android_namespace_t* library_namespace; struct android_namespace_t* _Nullable library_namespace;
} android_dlextinfo; } android_dlextinfo;
/** /**
@ -180,7 +180,7 @@ typedef struct {
* *
* Available since API level 21. * Available since API level 21.
*/ */
void* android_dlopen_ext(const char* __filename, int __flags, const android_dlextinfo* __info) void* _Nullable android_dlopen_ext(const char* _Nullable __filename, int __flags, const android_dlextinfo* _Nullable __info)
__INTRODUCED_IN(21); __INTRODUCED_IN(21);
__END_DECLS __END_DECLS

View file

@ -159,7 +159,7 @@ uint64_t android_fdsan_get_owner_tag(int fd) __INTRODUCED_IN(29);
* *
* The return value points to memory with static lifetime, do not attempt to modify it. * The return value points to memory with static lifetime, do not attempt to modify it.
*/ */
const char* android_fdsan_get_tag_type(uint64_t tag) __INTRODUCED_IN(29); const char* _Nonnull android_fdsan_get_tag_type(uint64_t tag) __INTRODUCED_IN(29);
/* /*
* Get an owner tag's value, with the type masked off. * Get an owner tag's value, with the type masked off.

View file

@ -38,15 +38,15 @@
__BEGIN_DECLS __BEGIN_DECLS
static __inline double strtod_l(const char* __s, char** __end_ptr, locale_t __l) { static __inline double strtod_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, locale_t _Nonnull __l) {
return strtod(__s, __end_ptr); return strtod(__s, __end_ptr);
} }
static __inline float strtof_l(const char* __s, char** __end_ptr, locale_t __l) { static __inline float strtof_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, locale_t _Nonnull __l) {
return strtof(__s, __end_ptr); return strtof(__s, __end_ptr);
} }
static __inline long strtol_l(const char* __s, char** __end_ptr, int __base, locale_t __l) { static __inline long strtol_l(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base, locale_t _Nonnull __l) {
return strtol(__s, __end_ptr, __base); return strtol(__s, __end_ptr, __base);
} }

View file

@ -46,6 +46,6 @@ __BEGIN_DECLS
* *
* Available since API level 21. * Available since API level 21.
*/ */
void android_set_abort_message(const char* __msg) __INTRODUCED_IN(21); void android_set_abort_message(const char* _Nullable __msg) __INTRODUCED_IN(21);
__END_DECLS __END_DECLS