summaryrefslogtreecommitdiffstats
path: root/vppinfra
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2015-12-18 10:26:56 +0100
committerDamjan Marion <damarion@cisco.com>2015-12-18 13:31:56 +0100
commit2c29d75021d684559146e656aac85f0c14ffb5ab (patch)
treef170a34ab269e94ab8c98ff77cd591e1f63157eb /vppinfra
parent5f1fd813c2773870ca92510c4e49a18810e9a4c8 (diff)
Fix warnings/errors reported by clang
Change-Id: Ifb2de64347526e3218e22067452f249ff878fd32 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vppinfra')
-rw-r--r--vppinfra/tools/elftool.c2
-rw-r--r--vppinfra/vppinfra/elog.h2
-rw-r--r--vppinfra/vppinfra/heap.c2
-rw-r--r--vppinfra/vppinfra/md5.c2
-rw-r--r--vppinfra/vppinfra/mheap.c2
-rw-r--r--vppinfra/vppinfra/test_vec.c3
6 files changed, 7 insertions, 6 deletions
diff --git a/vppinfra/tools/elftool.c b/vppinfra/tools/elftool.c
index c0184b5c..b8acd055 100644
--- a/vppinfra/tools/elftool.c
+++ b/vppinfra/tools/elftool.c
@@ -227,7 +227,7 @@ set_interpreter_rpath (elf_tool_main_t * tm)
u32 run_length;
u8 in_run;
u64 offset0 = 0, offset1 = 0;
- clib_error_t * error;
+ clib_error_t * error = 0;
int fix_in_place = 0;
if (!strcmp (tm->input_file, tm->output_file))
diff --git a/vppinfra/vppinfra/elog.h b/vppinfra/vppinfra/elog.h
index b49618bf..8c5482ae 100644
--- a/vppinfra/vppinfra/elog.h
+++ b/vppinfra/vppinfra/elog.h
@@ -182,7 +182,7 @@ always_inline void
elog_enable_disable (elog_main_t * em, int is_enabled)
{
em->n_total_events = 0;
- em->n_total_events_disable_limit = is_enabled ? ~0ULL : 0ULL;
+ em->n_total_events_disable_limit = is_enabled ? ~0 : 0;
}
/* Disable logging after specified number of ievents have been logged.
diff --git a/vppinfra/vppinfra/heap.c b/vppinfra/vppinfra/heap.c
index 01df54a3..5f44cd40 100644
--- a/vppinfra/vppinfra/heap.c
+++ b/vppinfra/vppinfra/heap.c
@@ -85,7 +85,7 @@ always_inline uword size_to_bin (uword size)
}
/* Convert bin to size. */
-always_inline uword bin_to_size (uword bin)
+always_inline __attribute__((unused)) uword bin_to_size (uword bin)
{
uword size;
diff --git a/vppinfra/vppinfra/md5.c b/vppinfra/vppinfra/md5.c
index ed0342b0..e6558d99 100644
--- a/vppinfra/vppinfra/md5.c
+++ b/vppinfra/vppinfra/md5.c
@@ -220,7 +220,7 @@ void md5_init (md5_context_t * c)
c->state[3] = 0x10325476;
}
-always_inline void
+always_inline void __attribute__((unused))
md5_fill_buffer_aligned (md5_context_t * c,
u32 * d32)
{
diff --git a/vppinfra/vppinfra/mheap.c b/vppinfra/vppinfra/mheap.c
index 60ecdc0a..cd8672e7 100644
--- a/vppinfra/vppinfra/mheap.c
+++ b/vppinfra/vppinfra/mheap.c
@@ -115,7 +115,7 @@ mheap_elt_size_to_user_n_bytes (uword n_bytes)
return (n_bytes - STRUCT_OFFSET_OF (mheap_elt_t, user_data));
}
-always_inline uword
+always_inline uword __attribute__((unused))
mheap_elt_size_to_user_n_words (uword n_bytes)
{
ASSERT (n_bytes % MHEAP_USER_DATA_WORD_BYTES == 0);
diff --git a/vppinfra/vppinfra/test_vec.c b/vppinfra/vppinfra/test_vec.c
index ea66ac1b..12c0603e 100644
--- a/vppinfra/vppinfra/test_vec.c
+++ b/vppinfra/vppinfra/test_vec.c
@@ -1049,7 +1049,8 @@ int test_vec_main (unformat_input_t * input)
{
u8 * bigboy = 0;
u64 one_gig = (1<<30);
- u64 size, index;
+ u64 size;
+ i64 index;
fformat (stdout, "giant vector test...");
size = 5ULL * one_gig;