diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-10-19 11:10:52 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-10-19 16:56:47 -0700 |
commit | e0ca083dada62cff23b58e9c55b48c854a436ff8 (patch) | |
tree | af42845f418103c258ea8f844aa3c258006ee1dc | |
parent | bc75934a8912b237a7f4658d7cf28ddd9a766d41 (diff) |
Fix -Wshorten-64-to-32 warnings from clang
lndir.c:252:11: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
symlen = readlink (dp->d_name, symbuf, sizeof(symbuf) - 1);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lndir.c:261:19: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
basesymlen = readlink(buf, basesym, sizeof(basesym) - 1);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | lndir.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -148,8 +148,8 @@ dodir (const char *fn, /* name of "from" directory, either absolute or char basesym[MAXPATHLEN + 1]; struct stat sb, sc; int n_dirs; - int symlen; - int basesymlen = -1; + ssize_t symlen; + ssize_t basesymlen = -1; char *ocurdir; if ((fs->st_dev == ts->st_dev) && (fs->st_ino == ts->st_ino)) { |