summaryrefslogtreecommitdiff
path: root/src/pyfstream.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-02-17 15:17:52 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-02-17 15:17:52 -0600
commitc3a9a7d2c584a7651426b3516f4e9991c8063e02 (patch)
tree6a7748588d90d3d9e0032903548b3411d7277dd6 /src/pyfstream.h
parentc6b51a2635bdf7da803dd2fc8251d6c290f134a4 (diff)
downloadfork-ledger-c3a9a7d2c584a7651426b3516f4e9991c8063e02.tar.gz
fork-ledger-c3a9a7d2c584a7651426b3516f4e9991c8063e02.tar.bz2
fork-ledger-c3a9a7d2c584a7651426b3516f4e9991c8063e02.zip
Fixed many Clang type conversion warnings with static_cast
Diffstat (limited to 'src/pyfstream.h')
-rw-r--r--src/pyfstream.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pyfstream.h b/src/pyfstream.h
index 2fb9e1a7..49b072f2 100644
--- a/src/pyfstream.h
+++ b/src/pyfstream.h
@@ -68,7 +68,7 @@ protected:
// write multiple characters
virtual std::streamsize xsputn (const char* s, std::streamsize num) {
char * buf = new char[num + 1];
- std::strncpy(buf, s, num);
+ std::strncpy(buf, s, static_cast<std::size_t>(num));
buf[num] = '\0';
if (PyFile_WriteString(buf, reinterpret_cast<PyObject *>(fo)) < 0)
num = 0;
@@ -148,7 +148,7 @@ protected:
* - but at most size of putback area
*/
size_t numPutback;
- numPutback = gptr() - eback();
+ numPutback = static_cast<size_t>(gptr() - eback());
if (numPutback > pbSize) {
numPutback = pbSize;
}