summaryrefslogtreecommitdiff
path: root/flower
diff options
context:
space:
mode:
authorGraham Percival <graham@percival-music.ca>2011-12-08 03:05:32 -0800
committerGraham Percival <graham@percival-music.ca>2011-12-14 01:51:06 -0800
commit3540adb8b1fc55709776c9cf971e5ccefc22388a (patch)
tree6ee06e17770986e73c2841fcd18f2eca780f648b /flower
parent4d63d8b38e82f88212c528fd4c5f72b721b83922 (diff)
Avoid conversion changing signedness
/home/gperciva/src/lilypond/flower/file-cookie.cc:45:50: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion] return Memory_out_stream::writer (file, buf, i); ~~~~~~~~~~~~~~~~~ ^
Diffstat (limited to 'flower')
-rw-r--r--flower/file-cookie.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/flower/file-cookie.cc b/flower/file-cookie.cc
index 90aa5c908d..762acb1c06 100644
--- a/flower/file-cookie.cc
+++ b/flower/file-cookie.cc
@@ -39,10 +39,10 @@ extern "C" {
static char buf[65536];
int i = vsnprintf (buf, sizeof (buf), format, ap);
- if (i == -1 || (unsigned) i > sizeof (buf))
+ if (i < 0 || (unsigned) i > sizeof (buf))
assert (false);
va_end (ap);
- return Memory_out_stream::writer (file, buf, i);
+ return Memory_out_stream::writer (file, buf, (unsigned)i);
}
ssize_t