Skip to content

Commit fe14b05

Browse files
author
Nat!
committed
less warnings from superzealous compilers
1 parent 59f5aac commit fe14b05

File tree

3 files changed

+65
-37
lines changed

3 files changed

+65
-37
lines changed

cmake/share/CMakeTweaksC.cmake

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmake/share/Environment.cmake

Lines changed: 42 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mulle-allocator.c

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ void mulle_allocation_fail( struct mulle_allocator *p,
4848
{
4949
perror( "memory allocation:");
5050
abort();
51+
52+
MULLE_C_UNUSED( p);
53+
MULLE_C_UNUSED( block);
54+
MULLE_C_UNUSED( size);
5155
}
5256

5357

@@ -95,11 +99,16 @@ void *_mulle_allocator_realloc_strict( struct mulle_allocator *p,
9599
//
96100
// MULLE_C_NO_RETURN
97101
int mulle_allocator_no_aba_abort( void *aba,
98-
void (*free)( void *, void *),
99-
void *block,
100-
void *owner)
102+
void (*free)( void *, void *),
103+
void *block,
104+
void *owner)
101105
{
102106
abort();
107+
108+
MULLE_C_UNUSED( aba);
109+
MULLE_C_UNUSED( free);
110+
MULLE_C_UNUSED( block);
111+
MULLE_C_UNUSED( owner);
103112
}
104113

105114

@@ -118,6 +127,7 @@ void _mulle_allocator_invalidate( struct mulle_allocator *p)
118127

119128
static void no_free( void *ignored)
120129
{
130+
MULLE_C_UNUSED( ignored);
121131
}
122132

123133

@@ -168,6 +178,8 @@ static void *v_calloc( size_t n,
168178
size_t size,
169179
struct mulle_allocator *allocator)
170180
{
181+
MULLE_C_UNUSED( allocator);
182+
171183
return( calloc( n, size));
172184
}
173185

@@ -176,18 +188,24 @@ static void *v_realloc( void *block,
176188
size_t size,
177189
struct mulle_allocator *allocator)
178190
{
191+
MULLE_C_UNUSED( allocator);
192+
179193
return( realloc( block, size));
180194
}
181195

182196

183197
static void v_free( void *block, struct mulle_allocator *allocator)
184198
{
199+
MULLE_C_UNUSED( allocator);
200+
185201
free( block);
186202
}
187203

188204

189205
static void v_no_free( void *ignored, struct mulle_allocator *allocator)
190206
{
207+
MULLE_C_UNUSED( ignored);
208+
MULLE_C_UNUSED( allocator);
191209
}
192210

193211

0 commit comments

Comments
 (0)