Bug 684771 - js/src/jsscript.cpp(300) : warning C4309: 'specialization' : truncation of constant value. r=wmccloskey
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 06 Sep 2011 17:54:36 +0900
changeset 76569 1f5cd567c93a7ef6db27aa0539bdc2a4099935d0
parent 76568 2c23fb9199483e6190684094ce97b4fbe0b8f577
child 76570 db9e99d537f232324359b86112d8771bfad029fe
child 76596 d0dd86f41edbe116e188a03504967f5b32c7acc4
child 76655 2857288e9a3faa4660e1800a61fb887be2a85e95
child 76743 f9a690b1bd21b496784e70b39bdb6b6a36e7dc37
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewerswmccloskey
bugs684771
milestone9.0a1
Bug 684771 - js/src/jsscript.cpp(300) : warning C4309: 'specialization' : truncation of constant value. r=wmccloskey
js/src/jscrashreport.h
--- a/js/src/jscrashreport.h
+++ b/js/src/jscrashreport.h
@@ -51,32 +51,32 @@ void
 SnapshotGCStack();
 
 void
 SnapshotErrorStack();
 
 void
 SaveCrashData(uint64 tag, void *ptr, size_t size);
 
-template<size_t size, char marker>
+template<size_t size, unsigned char marker>
 class StackBuffer {
   private:
     JS_DECL_USE_GUARD_OBJECT_NOTIFIER
-    volatile char buffer[size + 4];
+    volatile unsigned char buffer[size + 4];
 
   public:
     StackBuffer(void *data JS_GUARD_OBJECT_NOTIFIER_PARAM) {
         JS_GUARD_OBJECT_NOTIFIER_INIT;
 
         buffer[0] = marker;
         buffer[1] = '[';
 
         for (size_t i = 0; i < size; i++) {
             if (data)
-                buffer[i + 2] = ((char *)data)[i];
+                buffer[i + 2] = ((unsigned char *)data)[i];
             else
                 buffer[i + 2] = 0;
         }
 
         buffer[size - 2] = ']';
         buffer[size - 1] = marker;
     }
 };