-
Notifications
You must be signed in to change notification settings - Fork 30
Fix warnings #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Fix warnings #95
Changes from all commits
d7188cb
280e0c0
0c8cc44
126539b
b5d6831
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -347,7 +347,7 @@ realpath_stk (const char *name, char *resolved, struct realpath_bufs *bufs) | |
|
||
/* Length of this file name component; it can be zero if a file | ||
name ends in '/'. */ | ||
long startlen = end - start; | ||
size_t startlen = end - start; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is copied from the libc implementation of realpath (we're both LGPL, so that's okay). Would rather leave the body of libc's realpath as unmodified as possible. |
||
|
||
if (startlen == 0) | ||
break; | ||
|
@@ -365,7 +365,7 @@ realpath_stk (const char *name, char *resolved, struct realpath_bufs *bufs) | |
if (!ISSLASH (dest[-1])) | ||
*dest++ = '/'; | ||
|
||
while (rname + bufs->rname.length - dest | ||
while ( (size_t)(rname + bufs->rname.length - dest) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above for not modifying realpath if not necessary |
||
< startlen + sizeof dir_suffix) | ||
{ | ||
long dest_offset = dest - rname; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave 'lock' an unsigned long (or a uint64_t). Same with the other 'lock' variables below.
held_by can remain a pid_t