diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-02-12 18:33:44 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-02-12 18:33:44 -0800 |
commit | 897e25de0cf27bd345130912a6da34b0c802a0ca (patch) | |
tree | b4b0742a257e29bb47627bff512e12122c2b953a | |
parent | 87fd28cd5a5acfe6e91c97c4af0a469e1e86cbd5 (diff) |
Store len in a size_t instead of an int in redirect()
Fixes clang warnings about converting back & forth:
main.c:761:8: warning: implicit conversion loses integer precision: 'size_t'
(aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
len = strlen(line);
~ ^~~~~~~~~~~~
main.c:763:41: warning: implicit conversion changes signedness: 'int' to
'size_t' (aka 'unsigned long') [-Wsign-conversion]
if (*buf == '#' && strncmp(line, buf, len) == 0)
~~~~~~~ ^~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -718,7 +718,7 @@ redirect(const char *line, const char *makefile) char backup[ BUFSIZ ], buf[ BUFSIZ ]; boolean found = FALSE; - int len; + size_t len; /* * if makefile is "-" then let it pour onto stdout. |