aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.cpp
diff options
context:
space:
mode:
authorGravatar Konrad Borowski <glitchmr@myopera.com>2013-11-25 15:56:08 +0100
committerGravatar Konrad Borowski <glitchmr@myopera.com>2013-11-25 15:56:08 +0100
commitac7a461070fa6d810ff9cebd40d968bd262d96d9 (patch)
tree8d24006f77d0f01f05efd6c09f9b9d3fc8fd0f70 /exec.cpp
parent8ceb4b83a4618fa691d81c9b7533f2cf3bcd64a3 (diff)
Cast size_t to unsigned long.
printf expects unsigned long (%lu) argument, however, size_t doesn't have to be declared as such. As %zu is C99 (but not C++), it shouldn't be used directly. Instead, I have to cast value to the correct type.
Diffstat (limited to 'exec.cpp')
-rw-r--r--exec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/exec.cpp b/exec.cpp
index 6317b653..b894ce69 100644
--- a/exec.cpp
+++ b/exec.cpp
@@ -188,7 +188,7 @@ void print_open_fds(void)
{
if (open_fds.at(i))
{
- fprintf(stderr, "fd %lu\n", i);
+ fprintf(stderr, "fd %lu\n", (unsigned long) i);
}
}
}