From: John Darrington Date: Sat, 18 Jul 2009 11:38:49 +0000 (+0200) Subject: Avoid compiler warning X-Git-Tag: build37~52 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c740eb1b205c034bba1af440567c5b13f407d28;p=pspp-builds.git Avoid compiler warning --- 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]))