1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
--- base/allocator/allocator_extension.cc 2015-04-15 00:18:47.000000000 +0200
+++ base/allocator/allocator_extension.cc 2015-04-18 21:44:25.000000000 +0200
@@ -35,20 +35,20 @@
void SetGetAllocatorWasteSizeFunction(
thunks::GetAllocatorWasteSizeFunction get_allocator_waste_size_function) {
DCHECK_EQ(thunks::GetGetAllocatorWasteSizeFunction(),
- reinterpret_cast<thunks::GetAllocatorWasteSizeFunction>(NULL));
+ static_cast<thunks::GetAllocatorWasteSizeFunction>(NULL));
thunks::SetGetAllocatorWasteSizeFunction(get_allocator_waste_size_function);
}
void SetGetStatsFunction(thunks::GetStatsFunction get_stats_function) {
DCHECK_EQ(thunks::GetGetStatsFunction(),
- reinterpret_cast<thunks::GetStatsFunction>(NULL));
+ static_cast<thunks::GetStatsFunction>(NULL));
thunks::SetGetStatsFunction(get_stats_function);
}
void SetReleaseFreeMemoryFunction(
thunks::ReleaseFreeMemoryFunction release_free_memory_function) {
DCHECK_EQ(thunks::GetReleaseFreeMemoryFunction(),
- reinterpret_cast<thunks::ReleaseFreeMemoryFunction>(NULL));
+ static_cast<thunks::ReleaseFreeMemoryFunction>(NULL));
thunks::SetReleaseFreeMemoryFunction(release_free_memory_function);
}
--- base/strings/safe_sprintf_unittest.cc 2015-04-15 00:18:48.000000000 +0200
+++ base/strings/safe_sprintf_unittest.cc 2015-04-18 22:08:45.000000000 +0200
@@ -729,12 +729,14 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion-null"
#endif
+/* Avoid compiler error: http://pastebin.com/1edWUE84
EXPECT_EQ(1, SafeSPrintf(buf, "%d", NULL));
EXPECT_EQ("0", std::string(buf));
EXPECT_EQ(3, SafeSPrintf(buf, "%p", NULL));
EXPECT_EQ("0x0", std::string(buf));
EXPECT_EQ(6, SafeSPrintf(buf, "%s", NULL));
EXPECT_EQ("<NULL>", std::string(buf));
+*/
#if defined(__GCC__)
#pragma GCC diagnostic pop
#endif
--- base/threading/thread_local_storage_unittest.cc 2015-04-15 00:18:48.000000000 +0200
+++ base/threading/thread_local_storage_unittest.cc 2015-04-18 21:45:40.000000000 +0200
@@ -60,7 +60,7 @@
void ThreadLocalStorageCleanup(void *value) {
int *ptr = reinterpret_cast<int*>(value);
// Destructors should never be called with a NULL.
- ASSERT_NE(reinterpret_cast<int*>(NULL), ptr);
+ ASSERT_NE(static_cast<int*>(NULL), ptr);
if (*ptr == kFinalTlsValue)
return; // We've been called enough times.
ASSERT_LT(kFinalTlsValue, *ptr);
--- base/tracked_objects.cc 2015-04-15 00:31:20.000000000 +0200
+++ base/tracked_objects.cc 2015-04-18 21:57:33.000000000 +0200
@@ -393,7 +393,7 @@
}
// We must NOT do any allocations during this callback.
// Using the simple linked lists avoids all allocations.
- DCHECK_EQ(this->next_retired_worker_, reinterpret_cast<ThreadData*>(NULL));
+ DCHECK_EQ(this->next_retired_worker_, static_cast<ThreadData*>(NULL));
this->next_retired_worker_ = first_retired_worker_;
first_retired_worker_ = this;
}
--- base/tracked_objects_unittest.cc 2015-04-15 00:31:20.000000000 +0200
+++ base/tracked_objects_unittest.cc 2015-04-18 22:01:28.000000000 +0200
@@ -58,9 +58,9 @@
Births* birth = ThreadData::TallyABirthIfActive(location);
if (ThreadData::status() == ThreadData::DEACTIVATED)
- EXPECT_EQ(reinterpret_cast<Births*>(NULL), birth);
+ EXPECT_EQ(static_cast<Births*>(NULL), birth);
else
- EXPECT_NE(reinterpret_cast<Births*>(NULL), birth);
+ EXPECT_NE(static_cast<Births*>(NULL), birth);
}
// Helper function to verify the most common test expectations.
@@ -271,7 +271,7 @@
}
scoped_ptr<DeathData> data(new DeathData());
- ASSERT_NE(data, reinterpret_cast<DeathData*>(NULL));
+ ASSERT_NE(data, static_cast<DeathData*>(NULL));
EXPECT_EQ(data->run_duration_sum(), 0);
EXPECT_EQ(data->run_duration_sample(), 0);
EXPECT_EQ(data->queue_duration_sum(), 0);
--- chrome/browser/sync/glue/synced_session_tracker.cc 2015-04-15 00:18:50.000000000 +0200
+++ chrome/browser/sync/glue/synced_session_tracker.cc 2015-04-18 22:02:15.000000000 +0200
@@ -260,7 +260,7 @@
}
DCHECK(window_ptr);
DCHECK_EQ(window_ptr->window_id.id(), window_id);
- DCHECK_EQ(reinterpret_cast<sessions::SessionWindow*>(NULL),
+ DCHECK_EQ(static_cast<sessions::SessionWindow*>(NULL),
GetSession(session_tag)->windows[window_id]);
GetSession(session_tag)->windows[window_id] = window_ptr;
}
--- content/browser/frame_host/render_widget_host_view_guest.cc 2015-04-15 00:31:22.000000000 +0200
+++ content/browser/frame_host/render_widget_host_view_guest.cc 2015-04-18 22:10:28.000000000 +0200
@@ -241,11 +241,11 @@
gfx::NativeViewId RenderWidgetHostViewGuest::GetNativeViewId() const {
if (!guest_)
- return static_cast<gfx::NativeViewId>(NULL);
+ return reinterpret_cast<gfx::NativeViewId>(NULL);
RenderWidgetHostView* rwhv = guest_->GetOwnerRenderWidgetHostView();
if (!rwhv)
- return static_cast<gfx::NativeViewId>(NULL);
+ return reinterpret_cast<gfx::NativeViewId>(NULL);
return rwhv->GetNativeViewId();
}
--- media/audio/audio_output_proxy_unittest.cc 2015-04-15 00:18:55.000000000 +0200
+++ media/audio/audio_output_proxy_unittest.cc 2015-04-18 22:02:38.000000000 +0200
@@ -387,7 +387,7 @@
// |stream| is closed at this point. Start() should reopen it again.
EXPECT_CALL(manager(), MakeAudioOutputStream(_, _))
.Times(2)
- .WillRepeatedly(Return(reinterpret_cast<AudioOutputStream*>(NULL)));
+ .WillRepeatedly(Return(static_cast<AudioOutputStream*>(NULL)));
EXPECT_CALL(callback_, OnError(_))
.Times(2);
--- media/filters/decrypting_video_decoder_unittest.cc 2015-04-15 00:31:22.000000000 +0200
+++ media/filters/decrypting_video_decoder_unittest.cc 2015-04-18 22:03:40.000000000 +0200
@@ -420,7 +420,7 @@
// NULL callback to cancel the |decryptor_ready_cb|.
EXPECT_CALL(*this, RequestDecryptorNotification(IsNullCallback())).WillOnce(
ResetAndRunCallback(&decryptor_ready_cb,
- reinterpret_cast<Decryptor*>(NULL),
+ static_cast<Decryptor*>(NULL),
base::Bind(&DecryptingVideoDecoderTest::DecryptorSet,
base::Unretained(this))));
EXPECT_CALL(*this, DecryptorSet(_)).Times(0);
--- third_party/hunspell_new/src/hunspell/affentry.hxx.orig 2015-07-21 18:46:37.322427000 -0400
+++ third_party/hunspell_new/src/hunspell/affentry.hxx 2015-07-21 18:48:02.034251000 -0400
@@ -27,7 +27,7 @@
struct hentry * checkword(const char * word, int len, char in_compound,
const FLAG needflag = FLAG_NULL);
- struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
+ struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = 0);
char * check_morph(const char * word, int len, char in_compound,
const FLAG needflag = FLAG_NULL);
@@ -90,7 +90,7 @@
// const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, char in_compound=IN_CPD_NOT);
const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, const FLAG badflag = 0);
- struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
+ struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = 0);
char * check_twosfx_morph(const char * word, int len, int optflags,
PfxEntry* ppfx, const FLAG needflag = FLAG_NULL);
--- third_party/sfntly/cpp/src/sfntly/table/core/cmap_table.cc 2015-04-15 00:31:48.000000000 +0200
+++ third_party/sfntly/cpp/src/sfntly/table/core/cmap_table.cc 2015-04-18 22:05:41.000000000 +0200
@@ -439,7 +439,7 @@
}
CMapTable::CMapFormat0::Builder::Builder(const CMapId& cmap_id)
- : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL),
+ : CMap::Builder(static_cast<ReadableFontData*>(NULL),
CMapFormat::kFormat0,
cmap_id) {
}
@@ -563,7 +563,7 @@
: CMapTable::CMap::Builder(data ? down_cast<WritableFontData*>(
data->Slice(offset, data->ReadUShort(
offset + Offset::kFormat0Length)))
- : reinterpret_cast<WritableFontData*>(NULL),
+ : static_cast<WritableFontData*>(NULL),
CMapFormat::kFormat2, cmap_id) {
// TODO(arthurhsu): FIXIT: heavy lifting and leak, need fix.
}
@@ -574,7 +574,7 @@
: CMapTable::CMap::Builder(data ? down_cast<ReadableFontData*>(
data->Slice(offset, data->ReadUShort(
offset + Offset::kFormat0Length)))
- : reinterpret_cast<ReadableFontData*>(NULL),
+ : static_cast<ReadableFontData*>(NULL),
CMapFormat::kFormat2, cmap_id) {
// TODO(arthurhsu): FIXIT: heavy lifting and leak, need fix.
}
@@ -958,7 +958,7 @@
CMapTable::CMapFormat4::Builder::Builder(SegmentList* segments,
IntegerList* glyph_id_array,
const CMapId& cmap_id)
- : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL),
+ : CMap::Builder(static_cast<ReadableFontData*>(NULL),
CMapFormat::kFormat4, cmap_id),
segments_(segments->begin(), segments->end()),
glyph_id_array_(glyph_id_array->begin(), glyph_id_array->end()) {
@@ -966,7 +966,7 @@
}
CMapTable::CMapFormat4::Builder::Builder(const CMapId& cmap_id)
- : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL),
+ : CMap::Builder(static_cast<ReadableFontData*>(NULL),
CMapFormat::kFormat4, cmap_id) {
}
--- third_party/webrtc/base/taskrunner.cc 2015-04-15 00:32:17.000000000 +0200
+++ third_party/webrtc/base/taskrunner.cc 2015-04-18 22:10:53.000000000 +0200
@@ -102,7 +102,7 @@
std::vector<Task *>::iterator it;
it = std::remove(tasks_.begin(),
tasks_.end(),
- reinterpret_cast<Task *>(NULL));
+ static_cast<Task *>(NULL));
tasks_.erase(it, tasks_.end());
--- third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc.orig 2015-07-21 18:53:32.511953000 -0400
+++ third_party/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc 2015-07-21 18:54:56.010341000 -0400
@@ -989,7 +989,7 @@
const AudioEncoder* AudioCodingImpl::GetSenderInfo() const {
FATAL() << "Not implemented yet.";
- return reinterpret_cast<const AudioEncoder*>(NULL);
+ return static_cast<const AudioEncoder*>(NULL);
}
const CodecInst* AudioCodingImpl::GetSenderCodecInst() {
@@ -1009,7 +1009,7 @@
const ReceiverInfo* AudioCodingImpl::GetReceiverInfo() const {
FATAL() << "Not implemented yet.";
- return reinterpret_cast<const ReceiverInfo*>(NULL);
+ return static_cast<const ReceiverInfo*>(NULL);
}
bool AudioCodingImpl::RegisterReceiveCodec(AudioDecoder* receive_codec) {
--- v8/src/runtime/runtime-i18n.cc 2015-04-15 00:32:37.000000000 +0200
+++ v8/src/runtime/runtime-i18n.cc 2015-04-18 22:06:17.000000000 +0200
@@ -627,7 +627,7 @@
local_object->SetInternalField(0, reinterpret_cast<Smi*>(break_iterator));
// Make sure that the pointer to adopted text is NULL.
- local_object->SetInternalField(1, reinterpret_cast<Smi*>(NULL));
+ local_object->SetInternalField(1, static_cast<Smi*>(NULL));
Factory* factory = isolate->factory();
Handle<String> key = factory->NewStringFromStaticChars("breakIterator");
|