mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Fix new compiler warnings raised by GCC 9.x
This commit is contained in:
parent
76daefae78
commit
8a0aef8824
@ -197,12 +197,13 @@ typedef struct {
|
|||||||
s32 unk_x20;
|
s32 unk_x20;
|
||||||
s32 unk_x24;
|
s32 unk_x24;
|
||||||
u8 returnButtonFlag; ///< Controls whether the Return button is enabled, for newlines input. 0 = disabled, non-zero = enabled.
|
u8 returnButtonFlag; ///< Controls whether the Return button is enabled, for newlines input. 0 = disabled, non-zero = enabled.
|
||||||
u16 unk_x29;
|
u8 unk_x29;
|
||||||
|
u8 unk_x2a;
|
||||||
u8 unk_x2b;
|
u8 unk_x2b;
|
||||||
u32 flags; ///< Bitmask 0x4: unknown.
|
u32 flags; ///< Bitmask 0x4: unknown.
|
||||||
u8 unk_x30;
|
u8 unk_x30;
|
||||||
u8 unk_x31[0x17];
|
u8 unk_x31[0x17];
|
||||||
} PACKED SwkbdAppearArg;
|
} SwkbdAppearArg;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u32 unk_x0;
|
u32 unk_x0;
|
||||||
@ -226,7 +227,8 @@ typedef struct {
|
|||||||
u8 disableTouch; ///< Flags bitmask 0x200.
|
u8 disableTouch; ///< Flags bitmask 0x200.
|
||||||
u8 disableUSBKeyboard; ///< Flags bitmask 0x800.
|
u8 disableUSBKeyboard; ///< Flags bitmask 0x800.
|
||||||
u8 unk_x468[5];
|
u8 unk_x468[5];
|
||||||
u16 unk_x46d;
|
u8 unk_x46d;
|
||||||
|
u8 unk_x46e;
|
||||||
u8 unk_x46f;
|
u8 unk_x46f;
|
||||||
float keytopScaleX; ///< Flags bitmask 0x200.
|
float keytopScaleX; ///< Flags bitmask 0x200.
|
||||||
float keytopScaleY; ///< Flags bitmask 0x200.
|
float keytopScaleY; ///< Flags bitmask 0x200.
|
||||||
@ -241,7 +243,7 @@ typedef struct {
|
|||||||
u8 triggerFlag; ///< [6.0.0+] Enables using the trigger field when set.
|
u8 triggerFlag; ///< [6.0.0+] Enables using the trigger field when set.
|
||||||
u8 trigger; ///< [6.0.0+] Trigger
|
u8 trigger; ///< [6.0.0+] Trigger
|
||||||
u8 pad_x49f;
|
u8 pad_x49f;
|
||||||
} PACKED SwkbdInlineCalcArg;
|
} SwkbdInlineCalcArg;
|
||||||
|
|
||||||
/// Struct data for SwkbdInline Interactive reply storage ChangedString*, at the end following the string.
|
/// Struct data for SwkbdInline Interactive reply storage ChangedString*, at the end following the string.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -160,11 +160,10 @@ NX_CONSTEXPR void serviceCreateDomainSubservice(Service* s, Service* parent, u32
|
|||||||
* @brief Hints the compiler that a service will always contain a domain object.
|
* @brief Hints the compiler that a service will always contain a domain object.
|
||||||
* @param[in] s Service object.
|
* @param[in] s Service object.
|
||||||
*/
|
*/
|
||||||
NX_CONSTEXPR void serviceAssumeDomain(Service* s)
|
#define serviceAssumeDomain(_s) do { \
|
||||||
{
|
if (!(_s)->object_id) \
|
||||||
if (!s->object_id)
|
__builtin_unreachable(); \
|
||||||
__builtin_unreachable();
|
} while(0)
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Closes a service.
|
* @brief Closes a service.
|
||||||
|
@ -214,7 +214,9 @@ Result errorSystemCreate(ErrorSystemConfig* c, const char* dialog_message, const
|
|||||||
|
|
||||||
if (hosversionBefore(5,0,0)) {
|
if (hosversionBefore(5,0,0)) {
|
||||||
rc = setInitialize();
|
rc = setInitialize();
|
||||||
if (R_SUCCEEDED(rc)) rc = setMakeLanguageCode(SetLanguage_ENUS, &c->arg.languageCode);
|
u64 languageCode = 0;
|
||||||
|
if (R_SUCCEEDED(rc)) rc = setMakeLanguageCode(SetLanguage_ENUS, &languageCode);
|
||||||
|
if (R_SUCCEEDED(rc)) c->arg.languageCode = languageCode;
|
||||||
setExit();
|
setExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,7 +249,9 @@ Result errorApplicationCreate(ErrorApplicationConfig* c, const char* dialog_mess
|
|||||||
|
|
||||||
if (hosversionBefore(5,0,0)) {
|
if (hosversionBefore(5,0,0)) {
|
||||||
rc = setInitialize();
|
rc = setInitialize();
|
||||||
if (R_SUCCEEDED(rc)) rc = setMakeLanguageCode(SetLanguage_ENUS, &c->arg.languageCode);
|
u64 languageCode = 0;
|
||||||
|
if (R_SUCCEEDED(rc)) rc = setMakeLanguageCode(SetLanguage_ENUS, &languageCode);
|
||||||
|
if (R_SUCCEEDED(rc)) c->arg.languageCode = languageCode;
|
||||||
setExit();
|
setExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ struct in_addr __nxlink_host;
|
|||||||
extern char* fake_heap_start;
|
extern char* fake_heap_start;
|
||||||
extern char* fake_heap_end;
|
extern char* fake_heap_end;
|
||||||
|
|
||||||
extern u32 __argdata__;
|
extern u8 __argdata__[];
|
||||||
|
|
||||||
static char* g_argv_empty = NULL;
|
static char* g_argv_empty = NULL;
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ void argvSetup(void)
|
|||||||
MemoryInfo meminfo;
|
MemoryInfo meminfo;
|
||||||
u32 pageinfo=0;
|
u32 pageinfo=0;
|
||||||
|
|
||||||
u8 *argdata = (u8*)&__argdata__;
|
u8 *argdata = __argdata__;
|
||||||
u32 *arg32 = (u32*)argdata;
|
u32 *arg32 = (u32*)argdata;
|
||||||
u64 argdata_allocsize=0;
|
u64 argdata_allocsize=0;
|
||||||
u64 argdata_strsize=0;
|
u64 argdata_strsize=0;
|
||||||
@ -94,7 +94,7 @@ void argvSetup(void)
|
|||||||
argstart = NULL;
|
argstart = NULL;
|
||||||
|
|
||||||
for(argi=0; argi<argdata_strsize; argi++) {
|
for(argi=0; argi<argdata_strsize; argi++) {
|
||||||
if (argstart == NULL && isspace(args[argi])) continue;
|
if (argstart == NULL && isspace((unsigned char)args[argi])) continue;
|
||||||
|
|
||||||
if (argstart == NULL) {
|
if (argstart == NULL) {
|
||||||
if (args[argi] == '"') {
|
if (args[argi] == '"') {
|
||||||
@ -112,7 +112,7 @@ void argvSetup(void)
|
|||||||
if (quote_flag) {
|
if (quote_flag) {
|
||||||
if (args[argi] == '"') end_flag = 1;
|
if (args[argi] == '"') end_flag = 1;
|
||||||
}
|
}
|
||||||
else if (isspace(args[argi])) {
|
else if (isspace((unsigned char)args[argi])) {
|
||||||
end_flag = 1;
|
end_flag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,10 +73,9 @@ NX_INLINE Result _fsObjectDispatchImpl(
|
|||||||
int slot = -1;
|
int slot = -1;
|
||||||
if (_fsObjectIsChild(s)) {
|
if (_fsObjectIsChild(s)) {
|
||||||
slot = _fsGetSessionSlot();
|
slot = _fsGetSessionSlot();
|
||||||
|
if (slot < 0) __builtin_unreachable();
|
||||||
disp.target_session = g_fsSessions[slot];
|
disp.target_session = g_fsSessions[slot];
|
||||||
serviceAssumeDomain(s);
|
serviceAssumeDomain(s);
|
||||||
if (slot < 0)
|
|
||||||
__builtin_unreachable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Result rc = serviceDispatchImpl(s, request_id, in_data, in_data_size, out_data, out_data_size, disp);
|
Result rc = serviceDispatchImpl(s, request_id, in_data, in_data_size, out_data, out_data_size, disp);
|
||||||
|
Loading…
Reference in New Issue
Block a user