(main): Move declarations of SIZE and TOTAL to where they won't cause "unused" warnings when NO_MEM is defined.
(main): Move declarations of SIZE and TOTAL to where they won't cause "unused" warnings when NO_MEM is defined. (promotions): Explicitly declare return type (to avoid warnings). Always return a value. From-SVN: r6265
This commit is contained in:
parent
53117a2f4d
commit
b60e974d79
|
@ -646,8 +646,6 @@ int maximum_int() {
|
|||
|
||||
int main(argc, argv) int argc; char *argv[]; {
|
||||
int dprec, fprec, lprec;
|
||||
unsigned int size;
|
||||
long total;
|
||||
int i; char *s; int bad;
|
||||
|
||||
#ifdef SIGFPE
|
||||
|
@ -749,6 +747,8 @@ int main(argc, argv) int argc; char *argv[]; {
|
|||
}
|
||||
#ifndef NO_MEM
|
||||
if (V) {
|
||||
unsigned int size;
|
||||
long total;
|
||||
/* An extra goody: the approximate amount of data-space */
|
||||
/* Allocate store until no more available */
|
||||
/* Different implementations have a different argument type
|
||||
|
@ -1062,8 +1062,8 @@ Procedure ftyperr(name, esize, size) char *name; int esize, size; {
|
|||
name, ftype_of(esize), ftype_of(size));
|
||||
}
|
||||
|
||||
promotions() {
|
||||
int si; long sl;
|
||||
int promotions() {
|
||||
int si = 0; long sl = 0;
|
||||
unsigned int ui; unsigned long ul;
|
||||
short ss; unsigned short us;
|
||||
|
||||
|
@ -1086,6 +1086,7 @@ promotions() {
|
|||
|
||||
showtype("unsigned short promotes to", Promoted((unsigned short)0));
|
||||
showtype("long+unsigned gives", sl+ui);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define checktype(x, n, s, t) if((sgn(x)!=s)||(sizeof(x)!=sizeof(t))) typerr(n, s, sizeof(t), sign_of(x), sizeof(x));
|
||||
|
|
Loading…
Reference in New Issue