summaryrefslogtreecommitdiff
path: root/src/core/hle/ipc_helpers.h
diff options
context:
space:
mode:
authorGravatar Lioncash2020-10-13 08:10:50 -0400
committerGravatar Lioncash2020-10-13 13:16:49 -0400
commit39c8d18feba8eafcd43fbb55e73ae150a1947aad (patch)
tree9565ff464bbb9e5a0aa66e6e310098314e88d019 /src/core/hle/ipc_helpers.h
parentMerge pull request #3929 from FearlessTobi/ticket-keys (diff)
downloadyuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.gz
yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.xz
yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.zip
core/CMakeLists: Make some warnings errors
Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
Diffstat (limited to 'src/core/hle/ipc_helpers.h')
-rw-r--r--src/core/hle/ipc_helpers.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h
index 1b503331f..1c354037d 100644
--- a/src/core/hle/ipc_helpers.h
+++ b/src/core/hle/ipc_helpers.h
@@ -38,10 +38,11 @@ public:
38 explicit RequestHelperBase(Kernel::HLERequestContext& context) 38 explicit RequestHelperBase(Kernel::HLERequestContext& context)
39 : context(&context), cmdbuf(context.CommandBuffer()) {} 39 : context(&context), cmdbuf(context.CommandBuffer()) {}
40 40
41 void Skip(unsigned size_in_words, bool set_to_null) { 41 void Skip(u32 size_in_words, bool set_to_null) {
42 if (set_to_null) 42 if (set_to_null) {
43 memset(cmdbuf + index, 0, size_in_words * sizeof(u32)); 43 memset(cmdbuf + index, 0, size_in_words * sizeof(u32));
44 index += size_in_words; 44 }
45 index += static_cast<ptrdiff_t>(size_in_words);
45 } 46 }
46 47
47 /** 48 /**
@@ -49,15 +50,15 @@ public:
49 */ 50 */
50 void AlignWithPadding() { 51 void AlignWithPadding() {
51 if (index & 3) { 52 if (index & 3) {
52 Skip(4 - (index & 3), true); 53 Skip(static_cast<u32>(4 - (index & 3)), true);
53 } 54 }
54 } 55 }
55 56
56 unsigned GetCurrentOffset() const { 57 u32 GetCurrentOffset() const {
57 return static_cast<unsigned>(index); 58 return static_cast<u32>(index);
58 } 59 }
59 60
60 void SetCurrentOffset(unsigned offset) { 61 void SetCurrentOffset(u32 offset) {
61 index = static_cast<ptrdiff_t>(offset); 62 index = static_cast<ptrdiff_t>(offset);
62 } 63 }
63}; 64};
@@ -89,7 +90,7 @@ public:
89 90
90 // The entire size of the raw data section in u32 units, including the 16 bytes of mandatory 91 // The entire size of the raw data section in u32 units, including the 16 bytes of mandatory
91 // padding. 92 // padding.
92 u32 raw_data_size = sizeof(IPC::DataPayloadHeader) / 4 + 4 + normal_params_size; 93 u64 raw_data_size = sizeof(IPC::DataPayloadHeader) / 4 + 4 + normal_params_size;
93 94
94 u32 num_handles_to_move{}; 95 u32 num_handles_to_move{};
95 u32 num_domain_objects{}; 96 u32 num_domain_objects{};
@@ -105,7 +106,7 @@ public:
105 raw_data_size += sizeof(DomainMessageHeader) / 4 + num_domain_objects; 106 raw_data_size += sizeof(DomainMessageHeader) / 4 + num_domain_objects;
106 } 107 }
107 108
108 header.data_size.Assign(raw_data_size); 109 header.data_size.Assign(static_cast<u32>(raw_data_size));
109 if (num_handles_to_copy || num_handles_to_move) { 110 if (num_handles_to_copy || num_handles_to_move) {
110 header.enable_handle_descriptor.Assign(1); 111 header.enable_handle_descriptor.Assign(1);
111 } 112 }