Merge "Error message for incorrect FQNames."
diff --git a/PointerType.cpp b/PointerType.cpp
index 53dda83..4947e9e 100644
--- a/PointerType.cpp
+++ b/PointerType.cpp
@@ -42,11 +42,12 @@
 
 void PointerType::emitReaderWriter(
         Formatter& out,
-        const std::string& /* name */,
+        const std::string& name,
         const std::string& /* parcelObj */,
         bool /* parcelObjIsPointer */,
         bool /* isReader */,
         ErrorMode /* mode */) const {
+    out << "(void)" << name << ";\n";
     out << "LOG_ALWAYS_FATAL(\"Pointer is only supported in passthrough mode\");\n";
 }
 
diff --git a/generateCpp.cpp b/generateCpp.cpp
index 9f07fdc..04033a7 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -1160,7 +1160,8 @@
     out.sIf(nonNull + " == nullptr", [&] {
         out << "return ::android::hardware::Status::fromExceptionCode(\n";
         out.indent(2, [&] {
-            out << "::android::hardware::Status::EX_ILLEGAL_ARGUMENT);\n";
+            out << "::android::hardware::Status::EX_ILLEGAL_ARGUMENT,\n"
+                << "\"Null synchronous callback passed.\");\n";
         });
     }).endl().endl();
 }
@@ -1984,7 +1985,8 @@
         out << "return ::android::hardware::Status::fromExceptionCode(\n";
         out.indent();
         out.indent();
-        out << "::android::hardware::Status::EX_TRANSACTION_FAILED);\n";
+        out << "::android::hardware::Status::EX_TRANSACTION_FAILED,\n"
+            << "\"Passthrough oneway function queue exceeds maximum size.\");\n";
         out.unindent();
         out.unindent();
         out.unindent();
diff --git a/test/hidl_test_client.cpp b/test/hidl_test_client.cpp
index 40d63f9..75fc633 100644
--- a/test/hidl_test_client.cpp
+++ b/test/hidl_test_client.cpp
@@ -1190,6 +1190,13 @@
     }));
 }
 
+TEST_F(HidlTest, FooNullSynchronousCallbackTest) {
+    Return<void> ret = foo->echoNullInterface(nullptr, nullptr /* synchronous callback */);
+
+    EXPECT_FAIL(ret);
+    EXPECT_TRUE(ret.description().find("Null synchronous callback passed") != std::string::npos);
+}
+
 TEST_F(HidlTest, FooNullCallbackTest) {
     EXPECT_OK(foo->echoNullInterface(nullptr,
                 [](const auto receivedNull, const auto &intf) {