From 1c740eb1b205c034bba1af440567c5b13f407d28 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 18 Jul 2009 13:38:49 +0200 Subject: [PATCH] Avoid compiler warning --- Smake | 1 + src/math/interaction.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Smake b/Smake index 201474ce..2697064c 100644 --- a/Smake +++ b/Smake @@ -77,6 +77,7 @@ GNULIB_MODULES = \ unilbrk/ulc-width-linebreaks \ unistd \ unistr/u8-strlen \ + unistr/u8-strncat \ unlocked-io \ vasprintf-posix \ vfprintf-posix \ diff --git a/src/math/interaction.c b/src/math/interaction.c index 7911c8e7..7ed36f66 100644 --- a/src/math/interaction.c +++ b/src/math/interaction.c @@ -38,6 +38,7 @@ #include #include #include +#include struct interaction_variable { @@ -148,8 +149,8 @@ interaction_value_create (const struct interaction_variable *var, const union va if (var != NULL) { - int val_width = 1; uint8_t *val; + int val_width = 1; result = xmalloc (sizeof (*result)); result->intr = var; @@ -174,7 +175,7 @@ interaction_value_create (const struct interaction_variable *var, const union va { int w = var_get_width (var->members[i]); value_resize (result, val_width, val_width + w); - strncat (val, value_str (vals[i], w), w); + u8_strncat (val, value_str (vals[i], w), w); val = value_str_rw (&result->val, val_width); } else if (var_is_numeric (var->members[i])) -- 2.30.2