tsz = strlen("#line \"\"\n") + /* constant parts */
2 * strlen (filename) + /* filename with possibly all backslashes escaped */
- (int) (1 + log10 (abs (lineno))) + /* line number */
+ (size_t) (1 + ceil (log10 (abs (lineno)))) + /* line number */
1; /* NUL */
t = malloc(tsz);
if (!t)
char *str, *fmt = "#define %s %d\n";
size_t strsz;
- strsz = strlen(fmt) + strlen(scname[i]) + (int)(1 + log10(i)) + 2;
+ strsz = strlen(fmt) + strlen(scname[i]) + (size_t)(1 + ceil (log10(i))) + 2;
str = malloc(strsz);
if (!str)
flexfatal(_("allocation of macro definition failed"));