Add -Werror.

Also, fixed several warnings (including one bug in generateCppImpl.cpp).

Test: compiles

Bug: 32559427

Change-Id: I78375b9052c0ad447ebac638258f25bbf562712f
diff --git a/generateCpp.cpp b/generateCpp.cpp
index 6dcd3ca..2ea14ba 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -359,7 +359,6 @@
 
     if (isInterface) {
         const Interface *iface = mRootScope->getInterface();
-        const Interface *superType = iface->superType();
 
         out << "virtual bool isRemote() const ";
         if (!isIBase()) {
@@ -1444,6 +1443,9 @@
         }).endl();
         return OK;
     });
+    if (err != OK) {
+        return err;
+    }
 
     out << "::android::status_t " << klassName << "::onTransact(\n";