Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
9d866ac
)
Print an error instead of segfaulting with a bad compiler command line.
author
David Reiss
<dreiss@apache.org>
Tue, 10 Jun 2008 22:56:26 +0000
(22:56 +0000)
committer
David Reiss
<dreiss@apache.org>
Tue, 10 Jun 2008 22:56:26 +0000
(22:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666370
13f79535
-47bb-0310-9956-
ffa450edef68
compiler/cpp/src/main.cc
patch
|
blob
|
history
diff --git
a/compiler/cpp/src/main.cc
b/compiler/cpp/src/main.cc
index
9f9c260
..
f2f3a9b
100644
(file)
--- a/
compiler/cpp/src/main.cc
+++ b/
compiler/cpp/src/main.cc
@@
-1112,6
+1112,10
@@
int main(int argc, char** argv) {
// Real-pathify it
char rp[PATH_MAX];
+ if (argv[i] == NULL) {
+ fprintf(stderr, "!!! Missing file name\n");
+ usage();
+ }
if (saferealpath(argv[i], rp) == NULL) {
failure("Could not open input file with realpath: %s", argv[i]);
}