exit(EX_SUCCESS);
}
-static int table_parser_errcb(struct libmnt_table *tb,
+static int table_parser_errcb(struct libmnt_table *tb __attribute__((__unused__)),
const char *filename, int line)
{
if (filename)
*/
void mnt_free_cache(struct libmnt_cache *cache)
{
- int i;
+ size_t i;
if (!cache)
return;
*/
static const char *cache_find_path(struct libmnt_cache *cache, const char *path)
{
- int i;
+ size_t i;
assert(cache);
assert(path);
static const char *cache_find_tag(struct libmnt_cache *cache,
const char *token, const char *value)
{
- int i;
+ size_t i;
size_t tksz;
assert(cache);
static char *cache_find_tag_value(struct libmnt_cache *cache,
const char *devname, const char *token)
{
- int i;
+ size_t i;
assert(cache);
assert(devname);
*/
int mnt_cache_read_tags(struct libmnt_cache *cache, const char *devname)
{
- int i, ntags = 0, rc;
+ size_t i, ntags = 0;
+ int rc;
const char *tags[] = { "LABEL", "UUID", "TYPE" };
assert(cache);
ntags++;
}
- DBG(CACHE, mnt_debug_h(cache, "\tread %d tags", ntags));
+ DBG(CACHE, mnt_debug_h(cache, "\tread %zd tags", ntags));
return ntags ? 0 : 1;
error:
return -1;
path, name, type);
path = strtok_r(NULL, ":", &p);
- if (rc >= sizeof(helper) || rc < 0)
+ if (rc < 0 || (size_t) rc >= sizeof(helper))
continue;
rc = stat(helper, &st);
*
* Returns: 0 or negative number in case of error.
*/
-int mnt_context_strerror(struct libmnt_context *cxt, char *buf, size_t bufsiz)
+int mnt_context_strerror(struct libmnt_context *cxt __attribute__((__unused__)),
+ char *buf __attribute__((__unused__)),
+ size_t bufsiz __attribute__((__unused__)))
{
/* TODO: based on cxt->syscall_errno or cxt->helper_status */
return 0;
* mnt_context_init_helper
* @cxt: mount context
* @action: MNT_ACT_{UMOUNT,MOUNT}
- * @flags: not used
+ * @flags: not used now
*
* This function infors libmount that used from [u]mount.type helper.
*
*
* Returns: 0 on success, negative number in case of error.
*/
-int mnt_context_init_helper(struct libmnt_context *cxt, int action, int flags)
+int mnt_context_init_helper(struct libmnt_context *cxt, int action,
+ int flags __attribute__((__unused__)))
{
int rc = mnt_context_disable_helpers(cxt, TRUE);
* traditional mtab locking
*/
-static void mnt_lockalrm_handler(int sig)
+static void mnt_lockalrm_handler(int sig __attribute__((__unused__)))
{
/* do nothing, say nothing, be nothing */
}
for (p = haystack; p && p < haystack + len; p++) {
char *sep = strchr(p, ',');
- size_t plen = sep ? sep - p : len - (p - haystack);
+ size_t plen = sep ? (size_t) (sep - p) :
+ len - (p - haystack);
if (plen == needle_len) {
if (!strncmp(p, needle, plen))
for (p = pattern; p < pattern + len; p++) {
char *sep = strchr(p, ',');
- size_t plen = sep ? sep - p : len - (p - pattern);
+ size_t plen = sep ? (size_t) (sep - p) :
+ len - (p - pattern);
if (!plen)
continue; /* if two ',' appear in a row */