diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-06 18:12:15 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-01-01 14:34:57 -0800 |
commit | 84f5fee3c769fc907c561110f4828416f921e81a (patch) | |
tree | 2da192cf588e5c7f93535b7d66e606e83df04a38 /cppsetup.c | |
parent | 40bcc8c3303a858c786f1d6d04ae5bbdec6b04ff (diff) |
Handle some implicit conversion warnings from clang
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'cppsetup.c')
-rw-r--r-- | cppsetup.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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') { |