Andrey Zhezherun : msvcp: Added missing casts to unsigned char in streambuf functions.

Alexandre Julliard julliard at winehq.org
Fri Jan 10 14:44:54 CST 2014


Module: wine
Branch: stable
Commit: 9eb0f54db1244041229b7050e587fdbb36cef0d9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9eb0f54db1244041229b7050e587fdbb36cef0d9

Author: Andrey Zhezherun <zhezherun at yandex.ru>
Date:   Thu Oct 31 23:38:29 2013 +0000

msvcp: Added missing casts to unsigned char in streambuf functions.

(cherry picked from commit c1a5b06d49e5e39c649b5f9aa231ad4c89aae54f)

---

 dlls/msvcp100/ios.c |    2 +-
 dlls/msvcp60/ios.c  |    6 +++---
 dlls/msvcp71/ios.c  |    6 +++---
 dlls/msvcp90/ios.c  |    6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/msvcp100/ios.c b/dlls/msvcp100/ios.c
index 16677f2..abf9d10 100644
--- a/dlls/msvcp100/ios.c
+++ b/dlls/msvcp100/ios.c
@@ -978,7 +978,7 @@ int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
 {
     TRACE("(%p %d)\n", this, ch);
     return basic_streambuf_char__Pnavail(this) ?
-        (*basic_streambuf_char__Pninc(this) = ch) :
+        (unsigned char)(*basic_streambuf_char__Pninc(this) = ch) :
         call_basic_streambuf_char_overflow(this, (unsigned char)ch);
 }
 
diff --git a/dlls/msvcp60/ios.c b/dlls/msvcp60/ios.c
index e985e07..7ce3694 100644
--- a/dlls/msvcp60/ios.c
+++ b/dlls/msvcp60/ios.c
@@ -1409,7 +1409,7 @@ int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
 {
     TRACE("(%p %d)\n", this, ch);
     return basic_streambuf_char__Pnavail(this) ?
-        (*basic_streambuf_char__Pninc(this) = ch) :
+        (unsigned char)(*basic_streambuf_char__Pninc(this) = ch) :
         call_basic_streambuf_char_overflow(this, (unsigned char)ch);
 }
 
@@ -3447,7 +3447,7 @@ int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int met
                 this->seekhigh, basic_streambuf_char_epptr(&this->base));
 
     if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
-        return (*basic_streambuf_char__Pninc(&this->base) = meta);
+        return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = meta);
 
     oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
     size = oldsize|0xf;
@@ -3484,7 +3484,7 @@ int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int met
         MSVCRT_operator_delete(ptr);
     }
 
-    return (*basic_streambuf_char__Pninc(&this->base) = meta);
+    return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = meta);
 }
 
 /* ?pbackfail@?$basic_stringbuf at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@MAEHH at Z */
diff --git a/dlls/msvcp71/ios.c b/dlls/msvcp71/ios.c
index 8fe6000..d9b7bc9 100644
--- a/dlls/msvcp71/ios.c
+++ b/dlls/msvcp71/ios.c
@@ -1451,7 +1451,7 @@ int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
 {
     TRACE("(%p %d)\n", this, ch);
     return basic_streambuf_char__Pnavail(this) ?
-        (*basic_streambuf_char__Pninc(this) = ch) :
+        (unsigned char)(*basic_streambuf_char__Pninc(this) = ch) :
         call_basic_streambuf_char_overflow(this, (unsigned char)ch);
 }
 
@@ -3697,7 +3697,7 @@ int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int met
                 this->seekhigh, basic_streambuf_char_epptr(&this->base));
 
     if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
-        return (*basic_streambuf_char__Pninc(&this->base) = meta);
+        return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = meta);
 
     oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
     size = oldsize|0xf;
@@ -3734,7 +3734,7 @@ int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int met
         MSVCRT_operator_delete(ptr);
     }
 
-    return (*basic_streambuf_char__Pninc(&this->base) = meta);
+    return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = meta);
 }
 
 /* ?pbackfail@?$basic_stringbuf at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@MAEHH at Z */
diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c
index 87ad06e..735c140 100644
--- a/dlls/msvcp90/ios.c
+++ b/dlls/msvcp90/ios.c
@@ -1406,7 +1406,7 @@ int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
 {
     TRACE("(%p %d)\n", this, ch);
     return basic_streambuf_char__Pnavail(this) ?
-        (*basic_streambuf_char__Pninc(this) = ch) :
+        (unsigned char)(*basic_streambuf_char__Pninc(this) = ch) :
         call_basic_streambuf_char_overflow(this, (unsigned char)ch);
 }
 
@@ -3702,7 +3702,7 @@ int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int met
                 this->seekhigh, basic_streambuf_char_epptr(&this->base));
 
     if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
-        return (*basic_streambuf_char__Pninc(&this->base) = meta);
+        return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = meta);
 
     oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
     size = oldsize|0xf;
@@ -3739,7 +3739,7 @@ int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int met
         MSVCRT_operator_delete(ptr);
     }
 
-    return (*basic_streambuf_char__Pninc(&this->base) = meta);
+    return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = meta);
 }
 
 /* ?pbackfail@?$basic_stringbuf at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@MAEHH at Z */




More information about the wine-cvs mailing list