GCC 4.9 complained about this, saying that the output could exceed the
buffer size. It doesn't seem worth arguing with it.
#include "libpspp/pool.h"
#include "libpspp/str.h"
-#include "gl/intprops.h"
#include "gl/minmax.h"
#include "gl/xalloc.h"
#include "gl/xmemdup0.h"
unsigned long int i;
for (i = 1; ; i++)
{
- char try_name[8 + 1 + INT_STRLEN_BOUND (i) + 1];
- sprintf (try_name, "%s_%lu", name, i);
+ char *try_name = xasprintf ("%s_%lu", name, i);
v = dict_create_var (dict, try_name, width);
+ free (try_name);
if (v != NULL)
break;
}