On Windows, p_atomic_inc_return returns an unsigned long long rather
than the type the pointer refers to, so let's make sure we cast the
result to the right type. Otherwise, we'll trigger a warning about
the wrong format-string for the type.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
fprintf(stderr, "dd: can't create a directory (%i)\n", errno);
snprintf(buf, buflen, "%s/%s_%u_%08u", dir, proc_name, getpid(),
- p_atomic_inc_return(&index) - 1);
+ (unsigned int)p_atomic_inc_return(&index) - 1);
if (verbose)
fprintf(stderr, "dd: dumping to file %s\n", buf);