diff --git a/src/smax-messages.c b/src/smax-messages.c index b68db9f..081e1c5 100644 --- a/src/smax-messages.c +++ b/src/smax-messages.c @@ -199,7 +199,7 @@ int smaxSendProgress(double fraction, const char *msg) { } progress = malloc(10 + strlen(msg)); - if(!progress) return x_error(X_NULL, errno, fn, "malloc() error (%d bytes)", 10 + strlen(msg)); + if(!progress) return x_error(X_NULL, errno, fn, "malloc() error (%ld bytes)", 10 + (long) strlen(msg)); sprintf(progress, "%.1f %s", (100.0 * fraction), msg); diff --git a/src/smax-util.c b/src/smax-util.c index 7cd60ec..20f649c 100644 --- a/src/smax-util.c +++ b/src/smax-util.c @@ -1165,7 +1165,7 @@ int smaxDeletePattern(const char *pattern) { prop_error(fn, n); metaPattern = (char *) malloc(strlen(pattern) + 20); - if(!metaPattern) return x_error(X_NULL, errno, fn, "malloc() error (%d bytes)", strlen(pattern) + 20); + if(!metaPattern) return x_error(X_NULL, errno, fn, "malloc() error (%ld bytes)", (long) strlen(pattern) + 20); sprintf(metaPattern, "<*>" X_SEP "%s", pattern); redisxDeleteEntries(smaxGetRedis(), metaPattern);