Skip to content
Snippets Groups Projects
Commit 36ea52b3 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Resolve more warings from GCC 12.2

parent 0e8f3833
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4013 passed
...@@ -46,10 +46,9 @@ uifcapi_t uifc; ...@@ -46,10 +46,9 @@ uifcapi_t uifc;
void read_ini(void) void read_ini(void)
{ {
FILE *inifile; FILE *inifile;
BOOL tmpbool;
int opts; int opts;
int table; int table;
char key_name[8]; char key_name[16];
inifile=fopen("dpoker.ini","r"); inifile=fopen("dpoker.ini","r");
iniReadString(inifile,NULL,"ComputerName","King Drafus",comp_name); iniReadString(inifile,NULL,"ComputerName","King Drafus",comp_name);
...@@ -93,10 +92,8 @@ void read_ini(void) ...@@ -93,10 +92,8 @@ void read_ini(void)
void write_ini(void) void write_ini(void)
{ {
FILE *inifile; FILE *inifile;
BOOL tmpbool;
int opts;
int table; int table;
char key_name[8]; char key_name[16];
str_list_t inilines; str_list_t inilines;
if((inifile=fopen("dpoker.ini","r"))!=NULL) { if((inifile=fopen("dpoker.ini","r"))!=NULL) {
...@@ -173,7 +170,7 @@ void edit_table(int table) ...@@ -173,7 +170,7 @@ void edit_table(int table)
opts[2]=strdup(str); opts[2]=strdup(str);
sprintf(str,"Bet Limit %d",tables[table].bet_limit); sprintf(str,"Bet Limit %d",tables[table].bet_limit);
opts[3]=strdup(str); opts[3]=strdup(str);
sprintf(str,"Table Limit %d",tables[table].max_total); sprintf(str,"Table Limit %ld",tables[table].max_total);
opts[4]=strdup(str); opts[4]=strdup(str);
opts[5]=strdup(""); opts[5]=strdup("");
sprintf(str,"Table %d Options",table+1); sprintf(str,"Table %d Options",table+1);
...@@ -204,7 +201,7 @@ void edit_table(int table) ...@@ -204,7 +201,7 @@ void edit_table(int table)
tables[table].bet_limit=1; tables[table].bet_limit=1;
break; break;
case 4: /* Table Limit */ case 4: /* Table Limit */
sprintf(str,"%d",tables[table].max_total); sprintf(str,"%ld",tables[table].max_total);
if(uifc.input(WIN_MID|WIN_SAV,0,0,"Table Limit",str,5,K_EDIT|K_NUMBER)!=-1) if(uifc.input(WIN_MID|WIN_SAV,0,0,"Table Limit",str,5,K_EDIT|K_NUMBER)!=-1)
tables[table].max_total=atoi(str); tables[table].max_total=atoi(str);
if(tables[table].max_total<1) if(tables[table].max_total<1)
...@@ -250,7 +247,7 @@ int main(int argc, char **argv) ...@@ -250,7 +247,7 @@ int main(int argc, char **argv)
opts[0]=strdup(str); opts[0]=strdup(str);
sprintf(str,"Number of Tables %d",num_tables); sprintf(str,"Number of Tables %d",num_tables);
opts[1]=strdup(str); opts[1]=strdup(str);
sprintf(str,"Time allow playing computer %d",time_allowed); sprintf(str,"Time allow playing computer %ld",time_allowed);
opts[2]=strdup(str); opts[2]=strdup(str);
sprintf(str,"Percentage house takes from pot %d%%",skim); sprintf(str,"Percentage house takes from pot %d%%",skim);
opts[3]=strdup(str); opts[3]=strdup(str);
...@@ -280,7 +277,7 @@ int main(int argc, char **argv) ...@@ -280,7 +277,7 @@ int main(int argc, char **argv)
num_tables=1; num_tables=1;
break; break;
case 2: /* Time allowed */ case 2: /* Time allowed */
sprintf(str,"%d",time_allowed); sprintf(str,"%ld",time_allowed);
if(uifc.input(WIN_MID|WIN_SAV,0,0,"Time allowed computer",str,5,K_EDIT|K_NUMBER)!=-1) if(uifc.input(WIN_MID|WIN_SAV,0,0,"Time allowed computer",str,5,K_EDIT|K_NUMBER)!=-1)
time_allowed=atoi(str); time_allowed=atoi(str);
if(time_allowed>86400 || time_allowed<0) if(time_allowed>86400 || time_allowed<0)
...@@ -298,7 +295,7 @@ int main(int argc, char **argv) ...@@ -298,7 +295,7 @@ int main(int argc, char **argv)
case 4: /* Table configuration */ case 4: /* Table configuration */
while(1) { while(1) {
for(i=0;i<num_tables;i++) { for(i=0;i<num_tables;i++) {
sprintf(str,"Table %-2d (%u/%u/%u)",i+1 sprintf(str,"Table %-2d (%u/%u/%lu)",i+1
,tables[i].ante,tables[i].bet_limit,tables[i].max_total); ,tables[i].ante,tables[i].bet_limit,tables[i].max_total);
topts[i]=strdup(str); topts[i]=strdup(str);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment