Skip to content

Commit 6611040

Browse files
committed
Wundef warnings - change #if to #ifdef
1 parent 6b70808 commit 6611040

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/express/hash.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static void HASHexpand_table( Hash_Table );
125125
** Local data
126126
*/
127127

128-
# if HASH_STATISTICS
128+
# ifdef HASH_STATISTICS
129129
static long HashAccesses, HashCollisions;
130130
# endif
131131

@@ -174,15 +174,15 @@ HASHcreate( unsigned count ) {
174174
table->maxp = MUL( count, SEGMENT_SIZE_SHIFT );
175175
table->MinLoadFactor = 1;
176176
table->MaxLoadFactor = MAX_LOAD_FACTOR;
177-
# if HASH_DEBUG
177+
# ifdef HASH_DEBUG
178178
fprintf( stderr,
179179
"[HASHcreate] table %x count %d maxp %d SegmentCount %d\n",
180180
table,
181181
count,
182182
table->maxp,
183183
table->SegmentCount );
184184
# endif
185-
# if HASH_STATISTICS
185+
# ifdef HASH_STATISTICS
186186
HashAccesses = HashCollisions = 0;
187187
# endif
188188
return( table );
@@ -305,7 +305,7 @@ HASHdestroy( Hash_Table table ) {
305305
}
306306
}
307307
HASH_Table_destroy( table );
308-
# if HASH_STATISTICS && HASH_DEBUG
308+
# if defined(HASH_STATISTICS) && defined(HASH_DEBUG)
309309
fprintf( stderr,
310310
"[hdestroy] Accesses %ld Collisions %ld\n",
311311
HashAccesses,
@@ -325,7 +325,7 @@ HASHsearch( Hash_Table table, Element item, Action action ) {
325325
Element deleteme;
326326

327327
assert( table != HASH_NULL ); /* Kinder really than return(NULL); */
328-
# if HASH_STATISTICS
328+
# ifdef HASH_STATISTICS
329329
HashAccesses++;
330330
# endif
331331
h = HASHhash( item->key, table );
@@ -347,7 +347,7 @@ HASHsearch( Hash_Table table, Element item, Action action ) {
347347
while( q != NULL && strcmp( q->key, item->key ) ) {
348348
p = &q->next;
349349
q = *p;
350-
# if HASH_STATISTICS
350+
# ifdef HASH_STATISTICS
351351
HashCollisions++;
352352
# endif
353353
}

src/express/memory.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Freelist * create_freelist( struct freelist_head * flh, int bytes ) {
7878

7979
void
8080
_MEMinitialize() {
81-
#if DEBUG_MALLOC
81+
#ifdef DEBUG_MALLOC
8282
malloc_debug( 2 );
8383
#endif
8484
}
@@ -108,7 +108,7 @@ void MEMinitialize( struct freelist_head * flh, int size, int alloc1, int alloc2
108108
ERRORnospace();
109109
}
110110

111-
#if SPACE_PROFILE
111+
#ifdef SPACE_PROFILE
112112
flh->count = 0;
113113
#endif /*SPACE_PROFILE*/
114114

@@ -139,7 +139,7 @@ Generic MEM_new( struct freelist_head * flh ) {
139139
}
140140
#endif
141141

142-
#if SPACE_PROFILE
142+
#ifdef SPACE_PROFILE
143143
flh->count++;
144144
#endif /*SPACE_PROFILE*/
145145

src/express/resolve.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ void EXP_resolve( Expression expr, Scope scope, Type typecheck ) {
368368
f->u.func->pcount );
369369
}
370370

371-
#if future_work
371+
#ifdef future_work
372372
if( EXPRESS_lint ) {
373373
/* verify parameters match function call */
374374
}

0 commit comments

Comments
 (0)