diff options
| author | Andre Noll <maan@systemlinux.org> | 2012-08-15 11:32:10 +0200 |
|---|---|---|
| committer | Andre Noll <maan@systemlinux.org> | 2012-08-15 11:32:10 +0200 |
| commit | 42451d3bbe741ebae3c8ad49aa104ae53efdbcdb (patch) | |
| tree | 79091ddd0b83bfb05206f89d6a54337f862cd64a /string.c | |
| parent | 79489a96d14274b78a654bbcf60d8eb8289cae50 (diff) | |
| parent | 9e6c2f5e801c5b192d8e25987ef1a326dce20d27 (diff) | |
Merge branch 't/cleanups'
The changes in this branch are an attempt to make dss compile cleanly
with the more strict compiler flags (GCC 4.6 on Linux).
-pedantic -fno-common -W -Wall -Wcast-align -Wformat=2
-Wpointer-arith -Wundef -Waggregate-return -Wcast-qual
-Wmissing-declarations -Wnested-externs -Wstrict-prototypes
This is only a first step that addresses the easier warnings. Some,
like the ones stemming from the variadic macros, have yet to be fixed.
* 9e6c2f Remove some debug messages.
* 899f88 string.c: Fix a statement-before-declaration issue.
* 83ebb4 Remove trailing commas.
* 2ed0d7 snap.h: Fix HSA_ITEM.
* 508350 Fix "comma after last element" warning.
* 97fbf4 compare_snapshots(): Add const keyword.
* b28495 Avoid per-element initializers.
* 9528cf dss.c: Fix initialization of argv[].
* 4526f9 dss.c: Remove redundant const.
* 2183c6 Makefile: Split CPPFLAGS.
Conflicts:
error.h
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -93,8 +93,9 @@ __must_check __malloc void *dss_realloc(void *p, size_t size) */ __must_check __malloc void *dss_malloc(size_t size) { + void *p; assert(size); - void *p = malloc(size); + p = malloc(size); if (!p) { DSS_EMERG_LOG("malloc failed (size = %zu), aborting\n", |
