From d6c6431a22f09f93c329b4f8278f5b60e733ec1d Mon Sep 17 00:00:00 2001 From: Pablo Curiel Date: Tue, 20 Apr 2021 14:43:50 -0400 Subject: [PATCH] Fix unused parameter warnings in tipc.h when -Wextra is used. (#545) Removes unused TipcService parameter in tipcMakeRequest and tipcParseResponse. --- nx/include/switch/sf/tipc.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/nx/include/switch/sf/tipc.h b/nx/include/switch/sf/tipc.h index 60758272..52f74cbe 100644 --- a/nx/include/switch/sf/tipc.h +++ b/nx/include/switch/sf/tipc.h @@ -125,7 +125,7 @@ NX_CONSTEXPR void _tipcRequestProcessBuffer(HipcRequest* req, const SfBuffer* bu } NX_INLINE void* tipcMakeRequest( - const TipcService *s, u32 request_id, u32 data_size, bool send_pid, + u32 request_id, u32 data_size, bool send_pid, const SfBufferAttrs buffer_attrs, const SfBuffer* buffers, u32 num_handles, const Handle* handles) { TipcRequestFormat fmt = {}; @@ -197,7 +197,7 @@ NX_CONSTEXPR void _tipcResponseGetHandle(HipcResponse* res, SfOutHandleAttr type } NX_INLINE Result tipcParseResponse( - const TipcService* s, u32 out_size, void** out_data, + u32 out_size, void** out_data, u32 num_out_objects, TipcService* out_objects, const SfOutHandleAttrs out_handle_attrs, Handle* out_handles ) { @@ -234,10 +234,7 @@ NX_INLINE Result tipcDispatchImpl( TipcDispatchParams disp ) { - // Make a copy of the service struct, so that the compiler can assume that it won't be modified by function calls. - const TipcService srv = *s; - - void* in = tipcMakeRequest(&srv, request_id, + void* in = tipcMakeRequest(request_id, in_data_size, disp.in_send_pid, disp.buffer_attrs, disp.buffers, disp.in_num_handles, disp.in_handles); @@ -248,8 +245,7 @@ NX_INLINE Result tipcDispatchImpl( Result rc = svcSendSyncRequest(s->session); if (R_SUCCEEDED(rc)) { void* out = NULL; - rc = tipcParseResponse(&srv, - out_data_size, &out, + rc = tipcParseResponse(out_data_size, &out, disp.out_num_objects, disp.out_objects, disp.out_handle_attrs, disp.out_handles);