summaryrefslogtreecommitdiff
path: root/dist/Cwd/Cwd.xs
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2010-12-11 18:18:12 +0000
committerZefram <zefram@fysh.org>2010-12-11 18:23:16 +0000
commitc33e8be1506a75e393304af89d64e3f46e0ca7cb (patch)
tree064f08620e62d11eca50f73b7439564b702f47ad /dist/Cwd/Cwd.xs
parentd6f31ecf904f01f8a2aab2bca55e33b1b51e0b4d (diff)
downloadperl-c33e8be1506a75e393304af89d64e3f46e0ca7cb.tar.gz
fix various compiler warnings from XS code
Trivial changes to fix warnings of types * unclear precedence * assignment as conditional * signed/unsigned mixing * unused parameter/variable * value computed not used * wrong argument type for a printf format * variable may be used uninitialised (due to unhandled switch case)
Diffstat (limited to 'dist/Cwd/Cwd.xs')
-rw-r--r--dist/Cwd/Cwd.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/Cwd/Cwd.xs b/dist/Cwd/Cwd.xs
index 123be683ea..421c9df8b4 100644
--- a/dist/Cwd/Cwd.xs
+++ b/dist/Cwd/Cwd.xs
@@ -106,7 +106,7 @@ bsd_realpath(const char *path, char resolved[MAXPATHLEN])
*/
p = strchr(left, '/');
s = p ? p : left + left_len;
- if (s - left >= sizeof(next_token)) {
+ if ((STRLEN)(s - left) >= (STRLEN)sizeof(next_token)) {
errno = ENAMETOOLONG;
return (NULL);
}
@@ -190,7 +190,7 @@ bsd_realpath(const char *path, char resolved[MAXPATHLEN])
*/
if (p != NULL) {
if (symlink[slen - 1] != '/') {
- if (slen + 1 >= sizeof(symlink)) {
+ if ((STRLEN)(slen + 1) >= (STRLEN)sizeof(symlink)) {
errno = ENAMETOOLONG;
return (NULL);
}