diff options
Diffstat (limited to 'qtools/qdatastream.cpp')
-rw-r--r-- | qtools/qdatastream.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qtools/qdatastream.cpp b/qtools/qdatastream.cpp index 5190b53..a2e5c3b 100644 --- a/qtools/qdatastream.cpp +++ b/qtools/qdatastream.cpp @@ -730,7 +730,7 @@ QDataStream &QDataStream::operator<<( Q_INT16 i ) if ( printable ) { // printable data char buf[16]; sprintf( buf, "%d\n", i ); - dev->writeBlock( buf, strlen(buf) ); + dev->writeBlock( buf, (int)strlen(buf) ); } else if ( noswap ) { // no conversion needed dev->writeBlock( (char *)&i, sizeof(Q_INT16) ); } else { // swap bytes @@ -761,7 +761,7 @@ QDataStream &QDataStream::operator<<( Q_INT32 i ) if ( printable ) { // printable data char buf[16]; sprintf( buf, "%d\n", i ); - dev->writeBlock( buf, strlen(buf) ); + dev->writeBlock( buf, (int)strlen(buf) ); } else if ( noswap ) { // no conversion needed dev->writeBlock( (char *)&i, sizeof(Q_INT32) ); } else { // swap bytes @@ -793,7 +793,7 @@ QDataStream &QDataStream::operator<<( Q_INT64 i ) if ( printable ) { // printable data char buf[20]; sprintf( buf, "%ld\n", i ); - dev->writeBlock( buf, strlen(buf) ); + dev->writeBlock( buf, (int)strlen(buf) ); } else if ( noswap ) { // no conversion needed dev->writeBlock( (char *)&i, sizeof(Q_INT64) ); } else { // swap bytes @@ -839,7 +839,7 @@ QDataStream &QDataStream::operator<<( float f ) if ( printable ) { // printable data char buf[32]; sprintf( buf, "%g\n", (double)f ); - dev->writeBlock( buf, strlen(buf) ); + dev->writeBlock( buf, (int)strlen(buf) ); } else { float g = f; // fixes float-on-stack problem if ( noswap ) { // no conversion needed @@ -869,7 +869,7 @@ QDataStream &QDataStream::operator<<( double f ) if ( printable ) { // printable data char buf[32]; sprintf( buf, "%g\n", f ); - dev->writeBlock( buf, strlen(buf) ); + dev->writeBlock( buf, (int)strlen(buf) ); } else if ( noswap ) { // no conversion needed dev->writeBlock( (char *)&f, sizeof(double) ); } else { // swap bytes |