@@ -36,7 +36,7 @@ namespace detail {
36
36
#define ALIGNAS (byte_alignment )
37
37
#endif
38
38
static const unsigned char ALIGNAS (8 ) kNull[2048] = { 0 }; // FIXME no sizeof(Value) exists
39
- const unsigned char & kNullRef = kNull [0 ];
39
+ static const unsigned char & kNullRef = kNull [0 ];
40
40
template <typename T, typename U>
41
41
const Value<T, U>& Value<T, U>::null = reinterpret_cast <const Value<T, U>&>(kNullRef );
42
42
template <typename T, typename U>
@@ -128,7 +128,7 @@ static inline typename _Value::StringDataPtr duplicateAndPrefixStringValue(
128
128
" length too big for prefixing" );
129
129
130
130
try {
131
- typename _Value::StringDataPtr newString (new typename _Value::StringData (value, value + length ));
131
+ typename _Value::StringDataPtr newString (new typename _Value::StringData ());
132
132
for (unsigned int i=0 ; i<sizeof (unsigned ); i++)
133
133
newString->push_back (reinterpret_cast <char *>(&length)[i]);
134
134
newString->insert (newString->end (), value, value+length);
@@ -157,7 +157,7 @@ inline static void decodePrefixedString(
157
157
/* * Free the string duplicated by duplicateStringValue()/duplicateAndPrefixStringValue().
158
158
*/
159
159
template <class _Value >
160
- static inline void releaseStringValue (char * value) { /* Unused */ } // FIXME Remove!
160
+ static inline void releaseStringValue (char * value) { ( void )(value); /* Unused */ } // FIXME Remove!
161
161
162
162
} // namespace detail
163
163
} // namespace Json
0 commit comments