summaryrefslogtreecommitdiff
path: root/pith/context.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-07-26 23:36:30 -0600
committerEduardo Chappa <chappa@washington.edu>2015-07-26 23:36:30 -0600
commit2695b63fbe6c6a2206a2637137c6cd654f69943a (patch)
tree717008efdac9ae66bf33985dc99ee68aea45bf11 /pith/context.c
parent36b77661542a63c4579943951d143c8cc9c99460 (diff)
downloadalpine-2695b63fbe6c6a2206a2637137c6cd654f69943a.tar.xz
* Clear even more warnings from clang 3.5 and MAC OSX.
Diffstat (limited to 'pith/context.c')
-rw-r--r--pith/context.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pith/context.c b/pith/context.c
index e92ee678..735cf1c9 100644
--- a/pith/context.c
+++ b/pith/context.c
@@ -190,18 +190,18 @@ context_apply(char *b, CONTEXT_S *c, char *name, size_t len)
else if(name[0] == '#'){
if(IS_REMOTE(c->context)){
char *p = strchr(c->context, '}'); /* name specifies namespace */
- snprintf(b, len, "%.*s", MIN(p - c->context + 1, len-1), c->context);
+ snprintf(b, len, "%.*s", (int) MIN(p - c->context + 1, len-1), c->context);
b[MIN(p - c->context + 1, len-1)] = '\0';
- snprintf(b+strlen(b), len-strlen(b), "%.*s", len-1-strlen(b), name);
+ snprintf(b+strlen(b), len-strlen(b), "%.*s", (int)(len-1-strlen(b)), name);
}
else{
strncpy(b, name, len-1);
}
}
else if(c->dir && c->dir->ref){ /* has reference string! */
- snprintf(b, len, "%.*s", len-1, c->dir->ref);
+ snprintf(b, len, "%.*s", (int) len-1, c->dir->ref);
b[len-1] = '\0';
- snprintf(b+strlen(b), len-strlen(b), "%.*s", len-1-strlen(b), name);
+ snprintf(b+strlen(b), len-strlen(b), "%.*s", (int) (len-1-strlen(b)), name);
}
else{ /* no ref, apply to context */
char *pq = NULL;
@@ -713,7 +713,7 @@ new_context(char *cntxt_string, int *prime)
snprintf(tmp_20k_buf, SIZEOF_20KBUF, "%solders%s%.100s in %.*s%s",
(*host) ? "F" : "Local f", (*host) ? " on " : "",
(*host) ? host : "",
- p ? MIN(p - rcontext, 100) : 0,
+ p ? (int) MIN(p - rcontext, 100) : 0,
rcontext, (p && (p - rcontext) > 0) ? "" : "home directory");
}