Skip to content

Commit 8f1cce6

Browse files
SciresMfincs
authored andcommitted
libnx: fix compilation with gcc15
1 parent 60bf943 commit 8f1cce6

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

nx/source/crypto/sha256.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static void _sha256ProcessBlocks(Sha256Context *ctx, const u8 *src_u8, size_t nu
163163
[cur_hash0]"+w"(cur_hash0), [cur_hash1]"+w"(cur_hash1),
164164
[prev_hash0]"+w"(prev_hash0), [prev_hash1]"+w"(prev_hash1),
165165
[tmp_hash]"=w"(tmp_hash), [src_u8]"+r"(src_u8)
166-
: [round_constants]"r"(s_roundConstants)
166+
: "m"(*(const u8 (*)[num_blocks*SHA256_BLOCK_SIZE])src_u8), [round_constants]"r"(s_roundConstants)
167167
:
168168
);
169169

nx/source/runtime/util/inet_addr.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,7 @@ static int inet_pton4(const char *src, void *dst) {
160160
* Paul Vixie, 1996.
161161
*/
162162
static const char *
163-
inet_ntop6(src, dst, size)
164-
const u_char *src;
165-
char *dst;
166-
size_t size;
163+
inet_ntop6(const u_char *src, char *dst, size_t size)
167164
{
168165
/*
169166
* Note that int32_t and int16_t need only be "at least" large enough
@@ -276,9 +273,7 @@ inet_ntop6(src, dst, size)
276273
* Paul Vixie, 1996.
277274
*/
278275
static int
279-
inet_pton6(src, dst)
280-
const char *src;
281-
u_char *dst;
276+
inet_pton6(const char *src, u_char *dst)
282277
{
283278
static const char xdigits_l[] = "0123456789abcdef",
284279
xdigits_u[] = "0123456789ABCDEF";

nx/source/services/btdrv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Result btdrvStartInquiry(u32 services, s64 duration) {
273273
u32 services;
274274
s64 duration;
275275
} in = { services, duration };
276-
276+
277277
return serviceDispatchIn(&g_btdrvSrv, 8, in);
278278
}
279279

@@ -1493,7 +1493,7 @@ bool btdrvCircularBufferFree(BtdrvCircularBuffer *c) {
14931493
if (read_offset == write_offset) return false;
14941494

14951495
u8 *data_ptr = &c->data[read_offset];
1496-
if (read_offset >= sizeof(c->data)) false;
1496+
if (read_offset >= sizeof(c->data)) return false;
14971497

14981498
u64 tmpsize = read_offset + 0x18;
14991499
if (tmpsize < sizeof(c->data)) tmpsize += *((u64*)&data_ptr[0x10]);

0 commit comments

Comments
 (0)