mirror of
https://github.com/citra-emu/citra-canary.git
synced 2024-12-25 20:35:34 +00:00
Merge pull request #4697 from xperia64/getopt_fix
Fix getopt return type on systems where char is unsigned by default
This commit is contained in:
commit
322f575ff5
|
@ -221,9 +221,9 @@ int main(int argc, char** argv) {
|
||||||
};
|
};
|
||||||
|
|
||||||
while (optind < argc) {
|
while (optind < argc) {
|
||||||
char arg = getopt_long(argc, argv, "g:i:m:r:p:fhv", long_options, &option_index);
|
int arg = getopt_long(argc, argv, "g:i:m:r:p:fhv", long_options, &option_index);
|
||||||
if (arg != -1) {
|
if (arg != -1) {
|
||||||
switch (arg) {
|
switch (static_cast<char>(arg)) {
|
||||||
case 'g':
|
case 'g':
|
||||||
errno = 0;
|
errno = 0;
|
||||||
gdb_port = strtoul(optarg, &endarg, 0);
|
gdb_port = strtoul(optarg, &endarg, 0);
|
||||||
|
|
|
@ -170,9 +170,9 @@ int main(int argc, char** argv) {
|
||||||
};
|
};
|
||||||
|
|
||||||
while (optind < argc) {
|
while (optind < argc) {
|
||||||
char arg = getopt_long(argc, argv, "n:d:p:m:w:g:u:t:a:i:hv", long_options, &option_index);
|
int arg = getopt_long(argc, argv, "n:d:p:m:w:g:u:t:a:i:hv", long_options, &option_index);
|
||||||
if (arg != -1) {
|
if (arg != -1) {
|
||||||
switch (arg) {
|
switch (static_cast<char>(arg)) {
|
||||||
case 'n':
|
case 'n':
|
||||||
room_name.assign(optarg);
|
room_name.assign(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue