X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Fmemory-stream.cc;h=511657f5fcc733d2b15d2846155f10cbdd88477f;hb=cf225f5b7524bdcbab046a1db852073eeeb98da9;hp=9d4c747ef5a41e231a4992b3ebf230c71304bdfd;hpb=863b09e94acb2b3e543cb68b096e8b40db1889f1;p=lilypond.git diff --git a/flower/memory-stream.cc b/flower/memory-stream.cc index 9d4c747ef5..511657f5fc 100644 --- a/flower/memory-stream.cc +++ b/flower/memory-stream.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2005--2011 Han-Wen Nienhuys + Copyright (C) 2005--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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