gcc 13 fixes (#610)

This commit is contained in:
Dave Murphy 2023-05-07 03:04:58 +01:00 committed by GitHub
parent d219884bfa
commit 8747689be1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -1270,7 +1270,7 @@ Result btdrvUnregisterGattNotification(u32 connection_handle, bool primary_servi
* @param[in] size Output buffer size. * @param[in] size Output buffer size.
* @oaram[out] type Output BleEventType. * @oaram[out] type Output BleEventType.
*/ */
Result btdrvGetLeHidEventInfo(void* buffer, size_t size, u32 *type); Result btdrvGetLeHidEventInfo(void* buffer, size_t size, BtdrvBleEventType *type);
/** /**
* @brief RegisterBleHidEvent * @brief RegisterBleHidEvent

View File

@ -91,13 +91,13 @@ typedef struct CmifResponse {
Handle* move_handles; Handle* move_handles;
} CmifResponse; } CmifResponse;
NX_CONSTEXPR void* cmifGetAlignedDataStart(u32* data_words, void* base) NX_INLINE void* cmifGetAlignedDataStart(u32* data_words, void* base)
{ {
intptr_t data_start = ((u8*)data_words - (u8*)base + 15) &~ 15; intptr_t data_start = ((u8*)data_words - (u8*)base + 15) &~ 15;
return (u8*)base + data_start; return (u8*)base + data_start;
} }
NX_CONSTEXPR CmifRequest cmifMakeRequest(void* base, CmifRequestFormat fmt) NX_INLINE CmifRequest cmifMakeRequest(void* base, CmifRequestFormat fmt)
{ {
// First of all, we need to figure out what size we need. // First of all, we need to figure out what size we need.
u32 actual_size = 16; u32 actual_size = 16;
@ -156,7 +156,7 @@ NX_CONSTEXPR CmifRequest cmifMakeRequest(void* base, CmifRequestFormat fmt)
return req; return req;
} }
NX_CONSTEXPR void* cmifMakeControlRequest(void* base, u32 request_id, u32 size) NX_INLINE void* cmifMakeControlRequest(void* base, u32 request_id, u32 size)
{ {
u32 actual_size = 16 + sizeof(CmifInHeader) + size; u32 actual_size = 16 + sizeof(CmifInHeader) + size;
HipcRequest hipc = hipcMakeRequestInline(base, HipcRequest hipc = hipcMakeRequestInline(base,
@ -173,7 +173,7 @@ NX_CONSTEXPR void* cmifMakeControlRequest(void* base, u32 request_id, u32 size)
return hdr+1; return hdr+1;
} }
NX_CONSTEXPR void cmifMakeCloseRequest(void* base, u32 object_id) NX_INLINE void cmifMakeCloseRequest(void* base, u32 object_id)
{ {
if (object_id) { if (object_id) {
HipcRequest hipc = hipcMakeRequestInline(base, HipcRequest hipc = hipcMakeRequestInline(base,
@ -257,7 +257,7 @@ NX_CONSTEXPR void cmifRequestHandle(CmifRequest* req, Handle handle)
*req->hipc.copy_handles++ = handle; *req->hipc.copy_handles++ = handle;
} }
NX_CONSTEXPR Result cmifParseResponse(CmifResponse* res, void* base, bool is_domain, u32 size) NX_INLINE Result cmifParseResponse(CmifResponse* res, void* base, bool is_domain, u32 size)
{ {
HipcResponse hipc = hipcParseResponse(base); HipcResponse hipc = hipcParseResponse(base);
void* start = cmifGetAlignedDataStart(hipc.data_words, base); void* start = cmifGetAlignedDataStart(hipc.data_words, base);

View File

@ -582,7 +582,7 @@ Result webConfigSetWebAudio(WebCommonConfig* config, bool flag) {
return _webConfigSetFlag(config, WebArgType_WebAudio, flag); return _webConfigSetFlag(config, WebArgType_WebAudio, flag);
} }
Result webConfigSetFooterFixedKind(WebCommonConfig* config, u32 kind) { Result webConfigSetFooterFixedKind(WebCommonConfig* config, WebFooterFixedKind kind) {
WebShimKind shim = _webGetShimKind(config); WebShimKind shim = _webGetShimKind(config);
if (shim != WebShimKind_Offline && shim != WebShimKind_Web) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized); if (shim != WebShimKind_Offline && shim != WebShimKind_Web) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
if (hosversionBefore(5,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); if (hosversionBefore(5,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);

View File

@ -1722,7 +1722,7 @@ bool appletHolderCheckFinished(AppletHolder *h) {
return R_SUCCEEDED(eventWait(&h->StateChangedEvent, 0)); return R_SUCCEEDED(eventWait(&h->StateChangedEvent, 0));
} }
u32 appletHolderGetExitReason(AppletHolder *h) { LibAppletExitReason appletHolderGetExitReason(AppletHolder *h) {
return h->exitreason; return h->exitreason;
} }