Skip to content

Commit 7972bb2

Browse files
committed
Fixes #305: ("Warnings with -Wstrict-prototypes").
1 parent db5b2f8 commit 7972bb2

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

doc/container.qbk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,7 @@ use [*Boost.Container]? There are several reasons for that:
14251425

14261426
* Fixed bugs/issues:
14271427
* [@https://github.com/boostorg/container/pull/294 GitHub #294: ['"CMake: Add option to use header-only Boost::container"]].
1428+
* [@https://github.com/boostorg/container/pull/305 GitHub #305: ['"Warnings with -Wstrict-prototypes"]].
14281429
* [@https://github.com/boostorg/container/pull/307 GitHub #307: ['"Fix all instances of MSVC warning C4146 (unsigned negation)"]].
14291430
* [@https://github.com/boostorg/container/issues/309 GitHub #309: ['"Performance regression of boost::container::static_vector introduced in boost v1.86"]].
14301431
* [@https://github.com/boostorg/container/issues/310 GitHub #310: ['"flat_map: Mention correct type in documentation of emplace and emplace_hint"]].

include/boost/container/detail/alloc_lib.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -254,17 +254,17 @@ int boost_cont_multialloc_arrays
254254

255255
void boost_cont_multidealloc(boost_cont_memchain *pchain);
256256

257-
size_t boost_cont_footprint();
257+
size_t boost_cont_footprint(void);
258258

259-
size_t boost_cont_allocated_memory();
259+
size_t boost_cont_allocated_memory(void);
260260

261261
size_t boost_cont_chunksize(const void *p);
262262

263-
int boost_cont_all_deallocated();
263+
int boost_cont_all_deallocated(void);
264264

265-
boost_cont_malloc_stats_t boost_cont_malloc_stats();
265+
boost_cont_malloc_stats_t boost_cont_malloc_stats(void);
266266

267-
size_t boost_cont_in_use_memory();
267+
size_t boost_cont_in_use_memory(void);
268268

269269
int boost_cont_trim(size_t pad);
270270

@@ -279,7 +279,7 @@ int boost_cont_shrink
279279
void* boost_cont_alloc
280280
(size_t minbytes, size_t preferred_bytes, size_t *received_bytes);
281281

282-
int boost_cont_malloc_check();
282+
int boost_cont_malloc_check(void);
283283

284284
boost_cont_command_ret_t boost_cont_allocation_command
285285
( allocation_type command
@@ -290,17 +290,17 @@ boost_cont_command_ret_t boost_cont_allocation_command
290290
, void *reuse_ptr
291291
);
292292

293-
void *boost_cont_sync_create();
293+
void *boost_cont_sync_create(void);
294294

295295
void boost_cont_sync_destroy(void *sync);
296296

297297
int boost_cont_sync_lock(void *sync);
298298

299299
void boost_cont_sync_unlock(void *sync);
300300

301-
int boost_cont_global_sync_lock();
301+
int boost_cont_global_sync_lock(void);
302302

303-
void boost_cont_global_sync_unlock();
303+
void boost_cont_global_sync_unlock(void);
304304

305305
#ifdef __cplusplus
306306
} //extern "C" {

src/dlmalloc_ext_2_8_6.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,12 +1218,12 @@ int boost_cont_multialloc_nodes
12181218
return ret;
12191219
}
12201220

1221-
size_t boost_cont_footprint()
1221+
size_t boost_cont_footprint(void)
12221222
{
12231223
return ((mstate)gm)->footprint;
12241224
}
12251225

1226-
size_t boost_cont_allocated_memory()
1226+
size_t boost_cont_allocated_memory(void)
12271227
{
12281228
size_t alloc_mem = 0;
12291229
mstate m = (mstate)gm;
@@ -1269,10 +1269,10 @@ size_t boost_cont_allocated_memory()
12691269
size_t boost_cont_chunksize(const void *p)
12701270
{ return chunksize(mem2chunk(p)); }
12711271

1272-
int boost_cont_all_deallocated()
1272+
int boost_cont_all_deallocated(void)
12731273
{ return !s_allocated_memory; }
12741274

1275-
boost_cont_malloc_stats_t boost_cont_malloc_stats()
1275+
boost_cont_malloc_stats_t boost_cont_malloc_stats(void)
12761276
{
12771277
mstate ms = (mstate)gm;
12781278
if (ok_magic(ms)) {
@@ -1285,7 +1285,7 @@ boost_cont_malloc_stats_t boost_cont_malloc_stats()
12851285
}
12861286
}
12871287

1288-
size_t boost_cont_in_use_memory()
1288+
size_t boost_cont_in_use_memory(void)
12891289
{ return s_allocated_memory; }
12901290

12911291
int boost_cont_trim(size_t pad)
@@ -1354,7 +1354,7 @@ void boost_cont_multidealloc(boost_cont_memchain *pchain)
13541354
internal_multialloc_free(ms, pchain);
13551355
}
13561356

1357-
int boost_cont_malloc_check()
1357+
int boost_cont_malloc_check(void)
13581358
{
13591359
#ifdef DEBUG
13601360
mstate ms = (mstate)gm;
@@ -1452,7 +1452,7 @@ int boost_cont_mallopt(int param_number, int value)
14521452
return change_mparam(param_number, value);
14531453
}
14541454

1455-
void *boost_cont_sync_create()
1455+
void *boost_cont_sync_create(void)
14561456
{
14571457
void *p = boost_cont_malloc(sizeof(MLOCK_T));
14581458
if(p){
@@ -1478,15 +1478,15 @@ int boost_cont_sync_lock(void *sync)
14781478
void boost_cont_sync_unlock(void *sync)
14791479
{ RELEASE_LOCK((MLOCK_T*)sync); }
14801480

1481-
int boost_cont_global_sync_lock()
1481+
int boost_cont_global_sync_lock(void)
14821482
{
14831483
int ret;
14841484
ensure_initialization();
14851485
ret = ACQUIRE_MALLOC_GLOBAL_LOCK();
14861486
return 0 == ret;
14871487
}
14881488

1489-
void boost_cont_global_sync_unlock()
1489+
void boost_cont_global_sync_unlock(void)
14901490
{
14911491
RELEASE_MALLOC_GLOBAL_LOCK()
14921492
}

0 commit comments

Comments
 (0)