summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-07 13:13:30 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-07 13:13:30 +0100
commit5c2dcb40e40a789b1bf2a3b19429acd23c7674b1 (patch)
treea529ac0457317a92b202ff233752a134d7120880
parentc538eeef891e08d81ec6adf7fb3aea57a3b81393 (diff)
handle default cases in switches
since gcc produces warnings when default cases are not handled, make it happy. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
-rw-r--r--actions.c12
-rw-r--r--jouer.c2
-rw-r--r--magies.c4
-rw-r--r--map.c2
-rw-r--r--menuchoixpersos.c2
-rw-r--r--menuprincipal.c2
6 files changed, 24 insertions, 0 deletions
diff --git a/actions.c b/actions.c
index 5c31a08..0053409 100644
--- a/actions.c
+++ b/actions.c
@@ -107,6 +107,8 @@ void Fattaquer(SURFACES *surfaces,POSITIONS *positions,PERSONNAGES persos[],int
Fblitcoloredselection(surfaces,positions,*Vtourallie,persos);
}
break;
+ default:
+ break;
}
break;
@@ -191,6 +193,8 @@ void Fselectionnermagienoire(SURFACES *surfaces,POSITIONS *positions,PERSONNAGES
SDL_Flip(surfaces->Pecran);
continuer=Fmagieelement(surfaces,positions,persos,Vtourallie,ennemis,Vnbennemis,selection,Vtour);
break;
+ default:
+ break;
}
}
}
@@ -242,6 +246,8 @@ void Fselectionnermagieblanche(SURFACES *surfaces,POSITIONS *positions,PERSONNAG
if(selection==SOIN)
continuer=Fmagiesoin(surfaces,positions,persos,Vtourallie,ennemis,Vnbennemis,Vtour);
break;
+ default:
+ break;
}
}
}
@@ -305,6 +311,8 @@ void Fselectionnerobjet(SURFACES *surfaces,POSITIONS *positions,PERSONNAGES pers
continuer=Fether(surfaces,positions,persos,Vtourallie,ennemis,Vnbennemis,objets,selection,Vtour);
}
break;
+ default:
+ break;
}
}
}
@@ -418,6 +426,8 @@ int Fpotion(SURFACES *surfaces,POSITIONS *positions,PERSONNAGES persos[],int *Vt
else if(type==POTIONPLUS)
objets->potionsplus--;
break;
+ default:
+ break;
}
break;
}
@@ -538,6 +548,8 @@ int Fether(SURFACES *surfaces,POSITIONS *positions,PERSONNAGES persos[],int *Vto
else if(type==ETHERPLUS)
objets->ethersplus--;
break;
+ default:
+ break;
}
break;
}
diff --git a/jouer.c b/jouer.c
index 0b7641a..7c67993 100644
--- a/jouer.c
+++ b/jouer.c
@@ -93,6 +93,8 @@ int Fjouer (SURFACES *surfaces, POSITIONS *positions, PERSONNAGES persos[],ENNEM
else if(selection==OBJETS)
Fselectionnerobjet(surfaces,positions,persos,&Vtourallie,ennemis,Vnbennemis,&objets,&Vtour);
break;
+ default:
+ break;
}
break;
}
diff --git a/magies.c b/magies.c
index 8d0460d..93a4813 100644
--- a/magies.c
+++ b/magies.c
@@ -117,6 +117,8 @@ int Fmagieelement (SURFACES *surfaces,POSITIONS *positions,PERSONNAGES persos[],
Fblitcoloredselection(surfaces,positions,*Vtourallie,persos);
}
break;
+ default:
+ break;
}
break;
}
@@ -229,6 +231,8 @@ int Fmagiesoin(SURFACES *surfaces,POSITIONS *positions,PERSONNAGES persos[],int
}
continuer=0;
break;
+ default:
+ break;
}
break;
}
diff --git a/map.c b/map.c
index ff0d61a..d7b59d6 100644
--- a/map.c
+++ b/map.c
@@ -30,6 +30,8 @@ void Fmap (SURFACES*surfaces, POSITIONS* positions,PERSONNAGES persos[],ENNEMIS
case SDLK_a:
continuer=0;
break;
+ default:
+ break;
}
break;
}
diff --git a/menuchoixpersos.c b/menuchoixpersos.c
index a41d548..a137611 100644
--- a/menuchoixpersos.c
+++ b/menuchoixpersos.c
@@ -86,6 +86,8 @@ void Fmenuchoixpersos (SURFACES *surfaces, POSITIONS *positions)
Vnbperso++;
continuer=0;
break;
+ default:
+ break;
}
break;
}
diff --git a/menuprincipal.c b/menuprincipal.c
index 64ada29..51d4732 100644
--- a/menuprincipal.c
+++ b/menuprincipal.c
@@ -57,6 +57,8 @@ void Fmenuprincipal (SURFACES *surfaces, POSITIONS *positions)
SDL_Flip (surfaces->Pecran);
}
break;
+ default:
+ break;
}
break;
}