girepository: Fix type of precondition return values

This fixes a compiler warning (`-Wnon-literal-null-conversion`) on
clang 13 on macOS.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-06-04 17:09:40 +01:00
parent 7efb96d29b
commit c2e7b2f3b0
No known key found for this signature in database
GPG Key ID: DCDF5885B1F3ED73

View File

@ -657,11 +657,11 @@ register_internal (GIRepository *repository,
Header *header; Header *header;
const char *namespace; const char *namespace;
g_return_val_if_fail (typelib != NULL, FALSE); g_return_val_if_fail (typelib != NULL, NULL);
header = (Header *)typelib->data; header = (Header *)typelib->data;
g_return_val_if_fail (header != NULL, FALSE); g_return_val_if_fail (header != NULL, NULL);
namespace = gi_typelib_get_string (typelib, header->namespace); namespace = gi_typelib_get_string (typelib, header->namespace);
@ -1907,7 +1907,7 @@ require_internal (GIRepository *repository,
char *tmp_version = NULL; char *tmp_version = NULL;
g_return_val_if_fail (GI_IS_REPOSITORY (repository), NULL); g_return_val_if_fail (GI_IS_REPOSITORY (repository), NULL);
g_return_val_if_fail (namespace != NULL, FALSE); g_return_val_if_fail (namespace != NULL, NULL);
typelib = get_registered_status (repository, namespace, version, allow_lazy, typelib = get_registered_status (repository, namespace, version, allow_lazy,
&is_lazy, &version_conflict); &is_lazy, &version_conflict);