From 84f5fee3c769fc907c561110f4828416f921e81a Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 6 Dec 2022 18:12:15 -0800 Subject: Handle some implicit conversion warnings from clang Signed-off-by: Alan Coopersmith --- cppsetup.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cppsetup.c') diff --git a/cppsetup.c b/cppsetup.c index 90d5eaa..d697730 100644 --- a/cppsetup.c +++ b/cppsetup.c @@ -39,14 +39,14 @@ static const char * my_if_errors(IfParser *ip, const char *cp, const char *expecting) { struct _parse_data *pd = (struct _parse_data *) ip->data; - int lineno = pd->filep->f_line; + long lineno = pd->filep->f_line; const char *filename = pd->filename; char prefix[300]; - int prefixlen; - int i; + long prefixlen; + long i; - snprintf(prefix, sizeof(prefix), "\"%s\":%d", filename, lineno); - prefixlen = strlen(prefix); + snprintf(prefix, sizeof(prefix), "\"%s\":%ld", filename, lineno); + prefixlen = (long) strlen(prefix); fprintf(stderr, "%s: %s", prefix, pd->line); i = cp - pd->line; if (i > 0 && pd->line[i - 1] != '\n') { -- cgit v1.2.3