diff arogue7/pack.c @ 239:837044d2c362

Merge the GCC5 and build fix branches. This fixes all warnings produced by GCC 5, except the ones related to system functions. Those could be fixed by including the proper headers, but it would be better to replace the system-dependent code with functions from mdport.c.
author John "Elwin" Edwards
date Fri, 11 Mar 2016 19:47:52 -0500
parents e1cd27c5464f
children 0250220d8cdd
line wrap: on
line diff
--- a/arogue7/pack.c	Tue Mar 08 19:45:41 2016 -0500
+++ b/arogue7/pack.c	Fri Mar 11 19:47:52 2016 -0500
@@ -249,12 +249,13 @@
 
     /* Relics can do strange things when you pick them up */
     if (obj->o_type == RELIC) {
+	int newclass;
 	switch (obj->o_which) {
 	    /* the ankh of Heil gives you prayers */
 	    case HEIL_ANKH:
 		msg("The ankh welds itself into your hand.");
 		if (player.t_ctype != C_CLERIC && player.t_ctype != C_PALADIN)
-		    fuse(prayer_recovery, 0, SPELLTIME, AFTER);
+		    fuse(prayer_recovery, NULL, SPELLTIME, AFTER);
 
 	    /* A cloak must be worn. */
 	    when EMORI_CLOAK:
@@ -306,7 +307,7 @@
 		msg("The excrutiating pain slowly turns into a dull throb.");
 		
 	    when QUILL_NAGROM:
-	        fuse(quill_charge,0,player.t_ctype==C_MAGICIAN ? 4 : 8,AFTER);
+	        fuse(quill_charge,NULL,player.t_ctype==C_MAGICIAN ? 4 : 8,AFTER);
 
 	    /* Weapons will insist on being wielded. */
 	    when MUSTY_DAGGER:
@@ -316,7 +317,8 @@
 		/* For the daggers start a fuse to change player to a thief. */
 		/* and set a daemon to eat gold.			     */
 		if (obj->o_which == MUSTY_DAGGER) {
-		    fuse(changeclass, C_THIEF, roll(20, 20), AFTER);
+		    newclass = C_THIEF;
+		    fuse(changeclass, &newclass, roll(20, 20), AFTER);
 		    if (purse > 0)
 			msg("Your purse feels lighter");
 		    else
@@ -326,7 +328,8 @@
 		}
 		/* For the axe start a fuse to change player to a fighter. */
 		if (obj->o_which == AXE_AKLAD)
-		    fuse(changeclass, C_FIGHTER, roll(20, 20), AFTER);
+		    newclass = C_FIGHTER;
+		    fuse(changeclass, &newclass, roll(20, 20), AFTER);
 		if (cur_weapon != NULL) {
 		    msg("The artifact insists you release your current weapon.");
 		    if (!dropcheck(cur_weapon)) {