Skip to content

Commit 62da608

Browse files
committed
Resolved NULL for unsigned int compiler warning.
1 parent 9365962 commit 62da608

File tree

14 files changed

+49
-49
lines changed

14 files changed

+49
-49
lines changed

src/branch.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Handle<Value> Branch::Create(const Arguments& args) {
9393
return ThrowException(Exception::Error(String::New("Number force is required.")));
9494
}
9595

96-
git_reference *out = NULL;
96+
git_reference *out = 0;
9797
git_repository * from_repo;
9898
from_repo = ObjectWrap::Unwrap<GitRepo>(args[0]->ToObject())->GetValue();
9999
const char * from_branch_name;
@@ -220,7 +220,7 @@ Handle<Value> Branch::Move(const Arguments& args) {
220220
return ThrowException(Exception::Error(String::New("Number force is required.")));
221221
}
222222

223-
git_reference *out = NULL;
223+
git_reference *out = 0;
224224
git_reference * from_branch;
225225
from_branch = ObjectWrap::Unwrap<GitReference>(args[0]->ToObject())->GetValue();
226226
const char * from_new_branch_name;
@@ -271,7 +271,7 @@ Handle<Value> Branch::Lookup(const Arguments& args) {
271271
return ThrowException(Exception::Error(String::New("BranchT branch_type is required.")));
272272
}
273273

274-
git_reference *out = NULL;
274+
git_reference *out = 0;
275275
git_repository * from_repo;
276276
from_repo = ObjectWrap::Unwrap<GitRepo>(args[0]->ToObject())->GetValue();
277277
const char * from_branch_name;
@@ -314,7 +314,7 @@ Handle<Value> Branch::Name(const Arguments& args) {
314314
return ThrowException(Exception::Error(String::New("Reference ref is required.")));
315315
}
316316

317-
const char *out = NULL;
317+
const char *out = 0;
318318
git_reference * from_ref;
319319
from_ref = ObjectWrap::Unwrap<GitReference>(args[0]->ToObject())->GetValue();
320320

@@ -345,7 +345,7 @@ Handle<Value> Branch::Upstream(const Arguments& args) {
345345
return ThrowException(Exception::Error(String::New("Reference branch is required.")));
346346
}
347347

348-
git_reference *out = NULL;
348+
git_reference *out = 0;
349349
git_reference * from_branch;
350350
from_branch = ObjectWrap::Unwrap<GitReference>(args[0]->ToObject())->GetValue();
351351

src/commit.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ Handle<Value> GitCommit::NthGenAncestor(const Arguments& args) {
287287
return ThrowException(Exception::Error(String::New("Number n is required.")));
288288
}
289289

290-
git_commit *ancestor = NULL;
290+
git_commit *ancestor = 0;
291291
unsigned int from_n;
292292
from_n = (unsigned int) args[0]->ToUint32()->Value();
293293

src/diff_list.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ Handle<Value> GitDiffList::Patch(const Arguments& args) {
182182
return ThrowException(Exception::Error(String::New("Number idx is required.")));
183183
}
184184

185-
git_diff_patch *patch_out = NULL;
186-
const git_diff_delta *delta_out = NULL;
185+
git_diff_patch *patch_out = 0;
186+
const git_diff_delta *delta_out = 0;
187187
size_t from_idx;
188188
from_idx = (size_t) args[0]->ToUint32()->Value();
189189

src/odb.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ git_odb *GitOdb::GetValue() {
8080
Handle<Value> GitOdb::Create(const Arguments& args) {
8181
HandleScope scope;
8282

83-
git_odb *out = NULL;
83+
git_odb *out = 0;
8484

8585
int result = git_odb_new(
8686
&out
@@ -112,7 +112,7 @@ Handle<Value> GitOdb::Open(const Arguments& args) {
112112
return ThrowException(Exception::Error(String::New("String objects_dir is required.")));
113113
}
114114

115-
git_odb *out = NULL;
115+
git_odb *out = 0;
116116
const char * from_objects_dir;
117117
String::Utf8Value objects_dir(args[0]->ToString());
118118
from_objects_dir = strdup(*objects_dir);
@@ -268,7 +268,7 @@ Handle<Value> GitOdb::ReadPrefix(const Arguments& args) {
268268
return ThrowException(Exception::Error(String::New("Number len is required.")));
269269
}
270270

271-
git_odb_object *out = NULL;
271+
git_odb_object *out = 0;
272272
git_odb * from_db;
273273
from_db = ObjectWrap::Unwrap<GitOdb>(args[0]->ToObject())->GetValue();
274274
const git_oid * from_short_id;

src/patch.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ Handle<Value> GitPatch::Size(const Arguments& args) {
116116
Handle<Value> GitPatch::Stats(const Arguments& args) {
117117
HandleScope scope;
118118

119-
size_t total_context = NULL;
120-
size_t total_additions = NULL;
121-
size_t total_deletions = NULL;
119+
size_t total_context = 0;
120+
size_t total_additions = 0;
121+
size_t total_deletions = 0;
122122

123123
int result = git_diff_patch_line_stats(
124124
&total_context
@@ -161,10 +161,10 @@ Handle<Value> GitPatch::Hunk(const Arguments& args) {
161161
return ThrowException(Exception::Error(String::New("Number hunk_idx is required.")));
162162
}
163163

164-
const git_diff_range *range = NULL;
165-
const char *header = NULL;
166-
size_t header_len = NULL;
167-
size_t lines_in_hunk = NULL;
164+
const git_diff_range *range = 0;
165+
const char *header = 0;
166+
size_t header_len = 0;
167+
size_t lines_in_hunk = 0;
168168
size_t from_hunk_idx;
169169
from_hunk_idx = (size_t) args[0]->ToUint32()->Value();
170170

@@ -249,11 +249,11 @@ Handle<Value> GitPatch::Line(const Arguments& args) {
249249
return ThrowException(Exception::Error(String::New("Number line_of_hunk is required.")));
250250
}
251251

252-
char line_origin = NULL;
253-
const char *content = NULL;
254-
size_t content_len = NULL;
255-
int old_lineno = NULL;
256-
int new_lineno = NULL;
252+
char line_origin = 0;
253+
const char *content = 0;
254+
size_t content_len = 0;
255+
int old_lineno = 0;
256+
int new_lineno = 0;
257257
size_t from_hunk_idx;
258258
from_hunk_idx = (size_t) args[0]->ToUint32()->Value();
259259
size_t from_line_of_hunk;
@@ -303,7 +303,7 @@ Handle<Value> GitPatch::Line(const Arguments& args) {
303303
Handle<Value> GitPatch::ToString(const Arguments& args) {
304304
HandleScope scope;
305305

306-
char *string = NULL;
306+
char *string = 0;
307307

308308
int result = git_diff_patch_to_str(
309309
&string

src/reference.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Handle<Value> GitReference::SetSymbolicTarget(const Arguments& args) {
322322
return ThrowException(Exception::Error(String::New("String target is required.")));
323323
}
324324

325-
git_reference *out = NULL;
325+
git_reference *out = 0;
326326
const char * from_target;
327327
String::Utf8Value target(args[0]->ToString());
328328
from_target = strdup(*target);
@@ -360,7 +360,7 @@ Handle<Value> GitReference::setTarget(const Arguments& args) {
360360
return ThrowException(Exception::Error(String::New("Oid id is required.")));
361361
}
362362

363-
git_reference *out = NULL;
363+
git_reference *out = 0;
364364
const git_oid * from_id;
365365
from_id = ObjectWrap::Unwrap<GitOid>(args[0]->ToObject())->GetValue();
366366

@@ -594,7 +594,7 @@ Handle<Value> GitReference::Peel(const Arguments& args) {
594594
return ThrowException(Exception::Error(String::New("Number type is required.")));
595595
}
596596

597-
git_object *out = NULL;
597+
git_object *out = 0;
598598
git_otype from_type;
599599
from_type = (git_otype) args[0]->ToInt32()->Value();
600600

src/remote.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ Handle<Value> GitRemote::Download(const Arguments& args) {
280280
if (args[0]->IsFunction()) {
281281
Persistent<Function>::New(Local<Function>::Cast(args[0]));
282282
} else {
283-
from_progress_cb = NULL;
283+
from_progress_cb = 0;
284284
}
285285
baton->progress_cb = from_progress_cb;
286286
baton->payloadReference = Persistent<Value>::New(args[1]);

src/repo.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ Handle<Value> GitRepo::Workdir(const Arguments& args) {
313313
Handle<Value> GitRepo::Odb(const Arguments& args) {
314314
HandleScope scope;
315315

316-
git_odb *out = NULL;
316+
git_odb *out = 0;
317317

318318
int result = git_repository_odb(
319319
&out
@@ -621,7 +621,7 @@ Handle<Value> GitRepo::CreateCommit(const Arguments& args) {
621621
String::Utf8Value update_ref(args[0]->ToString());
622622
from_update_ref = strdup(*update_ref);
623623
} else {
624-
from_update_ref = NULL;
624+
from_update_ref = 0;
625625
}
626626
baton->update_ref = from_update_ref;
627627
baton->authorReference = Persistent<Value>::New(args[1]);
@@ -638,7 +638,7 @@ Handle<Value> GitRepo::CreateCommit(const Arguments& args) {
638638
String::Utf8Value message_encoding(args[3]->ToString());
639639
from_message_encoding = strdup(*message_encoding);
640640
} else {
641-
from_message_encoding = NULL;
641+
from_message_encoding = 0;
642642
}
643643
baton->message_encoding = from_message_encoding;
644644
baton->messageReference = Persistent<Value>::New(args[4]);
@@ -934,7 +934,7 @@ Handle<Value> GitRepo::CreateSymbolicReference(const Arguments& args) {
934934
return ThrowException(Exception::Error(String::New("Number force is required.")));
935935
}
936936

937-
git_reference *out = NULL;
937+
git_reference *out = 0;
938938
const char * from_name;
939939
String::Utf8Value name(args[0]->ToString());
940940
from_name = strdup(*name);
@@ -988,7 +988,7 @@ Handle<Value> GitRepo::CreateReference(const Arguments& args) {
988988
return ThrowException(Exception::Error(String::New("Number force is required.")));
989989
}
990990

991-
git_reference *out = NULL;
991+
git_reference *out = 0;
992992
const char * from_name;
993993
String::Utf8Value name(args[0]->ToString());
994994
from_name = strdup(*name);
@@ -1124,7 +1124,7 @@ void GitRepo::AddRemoteAfterWork(uv_work_t *req) {
11241124
Handle<Value> GitRepo::CreateRevWalk(const Arguments& args) {
11251125
HandleScope scope;
11261126

1127-
git_revwalk *out = NULL;
1127+
git_revwalk *out = 0;
11281128

11291129
int result = git_revwalk_new(
11301130
&out
@@ -1157,7 +1157,7 @@ Handle<Value> GitRepo::GetSubmodule(const Arguments& args) {
11571157
return ThrowException(Exception::Error(String::New("String name is required.")));
11581158
}
11591159

1160-
git_submodule *submodule = NULL;
1160+
git_submodule *submodule = 0;
11611161
const char * from_name;
11621162
String::Utf8Value name(args[0]->ToString());
11631163
from_name = strdup(*name);
@@ -1203,7 +1203,7 @@ Handle<Value> GitRepo::AddSubmodule(const Arguments& args) {
12031203
return ThrowException(Exception::Error(String::New("Number use_gitlink is required.")));
12041204
}
12051205

1206-
git_submodule *submodule = NULL;
1206+
git_submodule *submodule = 0;
12071207
const char * from_url;
12081208
String::Utf8Value url(args[0]->ToString());
12091209
from_url = strdup(*url);
@@ -1800,7 +1800,7 @@ Handle<Value> GitRepo::GetReferences(const Arguments& args) {
18001800
if (args[0]->IsUint32()) {
18011801
from_list_flags = (unsigned int) args[0]->ToUint32()->Value();
18021802
} else {
1803-
from_list_flags = NULL;
1803+
from_list_flags = 0;
18041804
}
18051805
baton->list_flags = from_list_flags;
18061806
baton->callback = Persistent<Function>::New(Local<Function>::Cast(args[1]));
@@ -2160,7 +2160,7 @@ Handle<Value> GitRepo::Clone(const Arguments& args) {
21602160
if (args[2]->IsObject()) {
21612161
from_options = ObjectWrap::Unwrap<GitCloneOptions>(args[2]->ToObject())->GetValue();
21622162
} else {
2163-
from_options = NULL;
2163+
from_options = 0;
21642164
}
21652165
baton->options = from_options;
21662166
baton->callback = Persistent<Function>::New(Local<Function>::Cast(args[3]));
@@ -2235,7 +2235,7 @@ Handle<Value> GitRepo::GetRemote(const Arguments& args) {
22352235
return ThrowException(Exception::Error(String::New("String name is required.")));
22362236
}
22372237

2238-
git_remote *out = NULL;
2238+
git_remote *out = 0;
22392239
const char * from_name;
22402240
String::Utf8Value name(args[0]->ToString());
22412241
from_name = strdup(*name);

src/signature.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Handle<Value> GitSignature::Create(const Arguments& args) {
8888
return ThrowException(Exception::Error(String::New("Number offset is required.")));
8989
}
9090

91-
git_signature *out = NULL;
91+
git_signature *out = 0;
9292
const char * from_name;
9393
String::Utf8Value name(args[0]->ToString());
9494
from_name = strdup(*name);
@@ -140,7 +140,7 @@ Handle<Value> GitSignature::Now(const Arguments& args) {
140140
return ThrowException(Exception::Error(String::New("String email is required.")));
141141
}
142142

143-
git_signature *out = NULL;
143+
git_signature *out = 0;
144144
const char * from_name;
145145
String::Utf8Value name(args[0]->ToString());
146146
from_name = strdup(*name);

src/tag.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Handle<Value> GitTag::Peel(const Arguments& args) {
271271
return ThrowException(Exception::Error(String::New("Tag tag is required.")));
272272
}
273273

274-
git_object *tag_target_out = NULL;
274+
git_object *tag_target_out = 0;
275275
const git_tag * from_tag;
276276
from_tag = ObjectWrap::Unwrap<GitTag>(args[0]->ToObject())->GetValue();
277277

0 commit comments

Comments
 (0)