diff options
author | Graham Percival <graham@percival-music.ca> | 2011-12-15 06:41:07 -0800 |
---|---|---|
committer | Graham Percival <graham@percival-music.ca> | 2012-01-09 06:08:41 +0000 |
commit | 17b654ec37966abda737e6df511ce5a7c962ec92 (patch) | |
tree | 14bd7938d09d09790c17df104833c880e915428c /flower | |
parent | df3c00e1afb413ce60b37b0ad9e35ab9637a4b62 (diff) |
Avoid implicit sign conversion: size_t vs. ssize_t
Diffstat (limited to 'flower')
-rw-r--r-- | flower/memory-stream.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/flower/memory-stream.cc b/flower/memory-stream.cc index 9d4c747ef5..b034f85e5e 100644 --- a/flower/memory-stream.cc +++ b/flower/memory-stream.cc @@ -93,7 +93,7 @@ Memory_out_stream::writer (void *cookie, { Memory_out_stream *stream = (Memory_out_stream *) cookie; - ssize_t newsize = stream->size_ + size; + ssize_t newsize = stream->size_ + (ssize_t) size; bool change = false; while (newsize > stream->buffer_blocks_ * block_size_) @@ -105,12 +105,12 @@ Memory_out_stream::writer (void *cookie, if (change) stream->buffer_ = (char *) realloc (stream->buffer_, - stream->buffer_blocks_ * block_size_); + (size_t) (stream->buffer_blocks_ * block_size_)); memcpy (stream->buffer_ + stream->size_, buffer, size); stream->size_ = newsize; - return size; + return (ssize_t) size; } ssize_t |