summaryrefslogtreecommitdiffstats
path: root/tools/aidl
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-10-29 13:35:04 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-29 13:35:04 -0700
commited84dea928a5a830a19b5bcab7ad05a7e92f3279 (patch)
tree3433335ce3be3a69f12b957130e95b4d19f74e3f /tools/aidl
parent2fcefe45718af44452b725b61f4051f507cb7e5d (diff)
parent8f592378a1ea7f31d57253dc202f42707ef4da36 (diff)
downloadframeworks_base-ed84dea928a5a830a19b5bcab7ad05a7e92f3279.zip
frameworks_base-ed84dea928a5a830a19b5bcab7ad05a7e92f3279.tar.gz
frameworks_base-ed84dea928a5a830a19b5bcab7ad05a7e92f3279.tar.bz2
am 8f592378: am 69920427: Merge "Fix a variety of small publicly-reported bugs."
* commit '8f592378a1ea7f31d57253dc202f42707ef4da36': Fix a variety of small publicly-reported bugs.
Diffstat (limited to 'tools/aidl')
-rw-r--r--tools/aidl/aidl.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/aidl/aidl.cpp b/tools/aidl/aidl.cpp
index b8a4803..a84d743 100644
--- a/tools/aidl/aidl.cpp
+++ b/tools/aidl/aidl.cpp
@@ -207,7 +207,7 @@ check_filename(const char* filename, const char* package, buffer_type* name)
p = strchr(name->data, '.');
len = p ? p-name->data : strlen(name->data);
expected.append(name->data, len);
-
+
expected += ".aidl";
len = fn.length();
@@ -473,7 +473,7 @@ check_method(const char* filename, int kind, method_type* m)
err = 1;
goto next;
}
-
+
if (!(kind == INTERFACE_TYPE_BINDER ? t->CanWriteToParcel() : t->CanWriteToRpcData())) {
fprintf(stderr, "%s:%d parameter %d: '%s %s' can't be marshalled.\n",
filename, m->type.type.lineno, index,
@@ -536,7 +536,7 @@ check_method(const char* filename, int kind, method_type* m)
filename, m->name.lineno, index, arg->name.data);
err = 1;
}
-
+
next:
index++;
arg = arg->next;
@@ -797,7 +797,7 @@ parse_preprocessed_file(const string& filename)
//printf("%s:%d:...%s...%s...%s...\n", filename.c_str(), lineno,
// type, packagename, classname);
document_item_type* doc;
-
+
if (0 == strcmp("parcelable", type)) {
user_data_type* parcl = (user_data_type*)malloc(
sizeof(user_data_type));
@@ -847,6 +847,7 @@ parse_preprocessed_file(const string& filename)
else {
fprintf(stderr, "%s:%d: bad type in line: %s\n",
filename.c_str(), lineno, line);
+ fclose(f);
return 1;
}
err = gather_types(filename.c_str(), doc);
@@ -1103,13 +1104,13 @@ preprocess_aidl(const Options& options)
}
// write preprocessed file
- int fd = open( options.outputFileName.c_str(),
+ int fd = open( options.outputFileName.c_str(),
O_RDWR|O_CREAT|O_TRUNC|O_BINARY,
#ifdef HAVE_MS_C_RUNTIME
_S_IREAD|_S_IWRITE);
-#else
+#else
S_IRUSR|S_IWUSR|S_IRGRP);
-#endif
+#endif
if (fd == -1) {
fprintf(stderr, "aidl: could not open file for write: %s\n",
options.outputFileName.c_str());