lint follow up
Janet wrote: >There is one more new complaint that might cause problems: >explode.c(545): warning: conversion from long may lose accuracy
This commit is contained in:
@@ -585,7 +585,7 @@ E long FDECL(rndexp, (BOOLEAN_P));
|
|||||||
/* ### explode.c ### */
|
/* ### explode.c ### */
|
||||||
|
|
||||||
E void FDECL(explode, (int,int,int,int,CHAR_P,int));
|
E void FDECL(explode, (int,int,int,int,CHAR_P,int));
|
||||||
E int FDECL(scatter, (int, int, int, unsigned int, struct obj *));
|
E long FDECL(scatter, (int, int, int, unsigned int, struct obj *));
|
||||||
E void FDECL(splatter_burning_oil, (int, int));
|
E void FDECL(splatter_burning_oil, (int, int));
|
||||||
|
|
||||||
/* ### extralev.c ### */
|
/* ### extralev.c ### */
|
||||||
|
|||||||
@@ -874,7 +874,7 @@ dokick()
|
|||||||
}
|
}
|
||||||
if (rn2(15) && !(maploc->looted & TREE_LOOTED) &&
|
if (rn2(15) && !(maploc->looted & TREE_LOOTED) &&
|
||||||
(treefruit = rnd_treefruit_at(x, y))) {
|
(treefruit = rnd_treefruit_at(x, y))) {
|
||||||
int nfruit = 8-rnl(7), nfall;
|
long nfruit = 8L-rnl(7), nfall;
|
||||||
treefruit->quan = nfruit;
|
treefruit->quan = nfruit;
|
||||||
if (is_plural(treefruit))
|
if (is_plural(treefruit))
|
||||||
pline("Some %s fall from the tree!", xname(treefruit));
|
pline("Some %s fall from the tree!", xname(treefruit));
|
||||||
@@ -883,7 +883,7 @@ dokick()
|
|||||||
nfall = scatter(x,y,2,MAY_HIT,treefruit);
|
nfall = scatter(x,y,2,MAY_HIT,treefruit);
|
||||||
if ( nfall != nfruit ) {
|
if ( nfall != nfruit ) {
|
||||||
/* scatter left some in the tree */
|
/* scatter left some in the tree */
|
||||||
pline("%d %s got caught in the branches.",
|
pline("%ld %s got caught in the branches.",
|
||||||
nfruit-nfall, xname(treefruit));
|
nfruit-nfall, xname(treefruit));
|
||||||
}
|
}
|
||||||
exercise(A_DEX, TRUE);
|
exercise(A_DEX, TRUE);
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ struct scatter_chain {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* returns number of scattered objects */
|
/* returns number of scattered objects */
|
||||||
int
|
long
|
||||||
scatter(sx,sy,blastforce,scflags, obj)
|
scatter(sx,sy,blastforce,scflags, obj)
|
||||||
int sx,sy; /* location of objects to scatter */
|
int sx,sy; /* location of objects to scatter */
|
||||||
int blastforce; /* force behind the scattering */
|
int blastforce; /* force behind the scattering */
|
||||||
@@ -418,7 +418,7 @@ struct obj *obj; /* only scatter this obj */
|
|||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
struct scatter_chain *stmp, *stmp2 = 0;
|
struct scatter_chain *stmp, *stmp2 = 0;
|
||||||
struct scatter_chain *schain = (struct scatter_chain *)0;
|
struct scatter_chain *schain = (struct scatter_chain *)0;
|
||||||
int total = 0;
|
long total = 0L;
|
||||||
|
|
||||||
while ((otmp = individual_object ? obj : level.objects[sx][sy]) != 0) {
|
while ((otmp = individual_object ? obj : level.objects[sx][sy]) != 0) {
|
||||||
if (otmp->quan > 1L) {
|
if (otmp->quan > 1L) {
|
||||||
|
|||||||
Reference in New Issue
Block a user