summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorChristophe Fontaine <christophe.fontaine@enea.com>2017-10-02 18:10:54 +0200
committerChris Luke <chris_luke@comcast.com>2017-10-04 17:31:13 +0000
commitd3c008d108aa2187d1a2afe2833b4de25ca2c2ab (patch)
tree03c85d4348fc955b33e6a6d628b5f8b81a2c8af6 /src/vppinfra
parent9bce0f6d7c3f7f1d5f2989ff1157c2a1039cdef6 (diff)
[aarch64] Fixes CLI crashes on dpaa2 platform.
- always use 'va_args' as pointer in all format_* functions - u32 for all 'indent' params as it's declaration was inconsistent Change-Id: Ic5799309a6b104c9b50fec309cba789c8da99e79 Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/format.h4
-rw-r--r--src/vppinfra/graph.c2
-rw-r--r--src/vppinfra/mheap.c4
-rw-r--r--src/vppinfra/std-formats.c4
-rw-r--r--src/vppinfra/timing_wheel.c2
-rw-r--r--src/vppinfra/unix-formats.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/src/vppinfra/format.h b/src/vppinfra/format.h
index 3c4aec99c2b..a27fbb9d851 100644
--- a/src/vppinfra/format.h
+++ b/src/vppinfra/format.h
@@ -68,10 +68,10 @@ word va_fformat (FILE * f, char *fmt, va_list * va);
word fformat (FILE * f, char *fmt, ...);
word fdformat (int fd, char *fmt, ...);
-always_inline uword
+always_inline u32
format_get_indent (u8 * s)
{
- uword indent = 0;
+ u32 indent = 0;
u8 *nl;
if (!s)
diff --git a/src/vppinfra/graph.c b/src/vppinfra/graph.c
index 98a29046f17..ea11a96f1c8 100644
--- a/src/vppinfra/graph.c
+++ b/src/vppinfra/graph.c
@@ -156,7 +156,7 @@ format_graph (u8 * s, va_list * args)
graph_t *g = va_arg (*args, graph_t *);
graph_node_t *n;
graph_link_t *l;
- uword indent = format_get_indent (s);
+ u32 indent = format_get_indent (s);
s = format (s, "graph %d nodes", pool_elts (g->nodes));
/* *INDENT-OFF* */
diff --git a/src/vppinfra/mheap.c b/src/vppinfra/mheap.c
index 5bbbc65f8f1..47b7080ad36 100644
--- a/src/vppinfra/mheap.c
+++ b/src/vppinfra/mheap.c
@@ -1120,7 +1120,7 @@ format_mheap_stats (u8 * s, va_list * va)
{
mheap_t *h = va_arg (*va, mheap_t *);
mheap_stats_t *st = &h->stats;
- uword indent = format_get_indent (s);
+ u32 indent = format_get_indent (s);
s =
format (s,
@@ -1236,7 +1236,7 @@ format_mheap (u8 * s, va_list * va)
{
/* Make a copy of traces since we'll be sorting them. */
mheap_trace_t *t, *traces_copy;
- uword indent, total_objects_traced;
+ u32 indent, total_objects_traced;
traces_copy = vec_dup (h->trace_main.traces);
qsort (traces_copy, vec_len (traces_copy), sizeof (traces_copy[0]),
diff --git a/src/vppinfra/std-formats.c b/src/vppinfra/std-formats.c
index ac98f999f21..a11d758f284 100644
--- a/src/vppinfra/std-formats.c
+++ b/src/vppinfra/std-formats.c
@@ -89,7 +89,7 @@ format_hex_bytes (u8 * s, va_list * va)
/* Print short or long form depending on byte count. */
uword short_form = n_bytes <= 32;
- uword indent = format_get_indent (s);
+ u32 indent = format_get_indent (s);
if (n_bytes == 0)
return s;
@@ -286,7 +286,7 @@ format_hexdump (u8 * s, va_list * args)
const int line_len = 16;
u8 *line_hex = 0;
u8 *line_str = 0;
- uword indent = format_get_indent (s);
+ u32 indent = format_get_indent (s);
if (!len)
return s;
diff --git a/src/vppinfra/timing_wheel.c b/src/vppinfra/timing_wheel.c
index 064171ab4e4..09a46d52252 100644
--- a/src/vppinfra/timing_wheel.c
+++ b/src/vppinfra/timing_wheel.c
@@ -720,7 +720,7 @@ format_timing_wheel (u8 * s, va_list * va)
{
timing_wheel_t *w = va_arg (*va, timing_wheel_t *);
int verbose = va_arg (*va, int);
- uword indent = format_get_indent (s);
+ u32 indent = format_get_indent (s);
s = format (s, "level 0: %.4e - %.4e secs, 2^%d - 2^%d clocks",
(f64) (1 << w->log2_clocks_per_bin) / w->cpu_clocks_per_second,
diff --git a/src/vppinfra/unix-formats.c b/src/vppinfra/unix-formats.c
index b09433c9370..eceea2d25be 100644
--- a/src/vppinfra/unix-formats.c
+++ b/src/vppinfra/unix-formats.c
@@ -712,7 +712,7 @@ u8 * format_ethernet_packet (u8 * s, va_list * args)
struct ethhdr * h = va_arg (*args, struct ethhdr *);
uword proto = h->h_proto;
u8 * payload = (void *) (h + 1);
- uword indent;
+ u32 indent;
/* Check for 802.2/802.3 encapsulation. */
if (proto < ETH_DATA_LEN)