static void *scalloc(size_t size) {
void *result = calloc(size, 1);
- exit_if_null(result, "Error: out of memory (calloc(%zd))\n", size);
+ exit_if_null(result, "Error: out of memory (calloc(%zu))\n", size);
return result;
}
long num = strtol(value, &end, 10);
if (num < 0)
- die("Invalid min_width attribute found in section %s, line %d: %d\n"
+ die("Invalid min_width attribute found in section %s, line %d: %ld\n"
"Expected positive integer or string\n",
context->name, context->line, num);
else if (num == LONG_MIN || num == LONG_MAX || (end && *end != '\0'))
/* src/general.c */
char *skip_character(char *input, char character, int amount);
-void die(const char *fmt, ...);
+
+void die(const char *fmt, ...) __attribute__((format(printf, 1, 2), noreturn));
bool slurp(const char *filename, char *destination, int size);
/* src/output.c */
snd_mixer_selem_id_set_index(sid, mixer_idx);
snd_mixer_selem_id_set_name(sid, mixer);
if (!(elem = snd_mixer_find_selem(m, sid))) {
- fprintf(stderr, "i3status: ALSA: Cannot find mixer %s (index %i)\n",
+ fprintf(stderr, "i3status: ALSA: Cannot find mixer %s (index %u)\n",
snd_mixer_selem_id_get_name(sid), snd_mixer_selem_id_get_index(sid));
snd_mixer_close(m);
snd_mixer_selem_id_free(sid);