Fix broken input tests

InputPublisherAndConsumer_test currently segfaults due to
null pointer dereference. This is because 0 is passed instead
of a valid pointer to an allocated int32_t. Also, enforce strict
compiler warnings, include signed comparisons.

Bug: 62033391
Test: m -j libinput_tests_InputEvent_test
libinput_tests_InputChannel_test
libinput_tests_InputPublisherAndConsumer_test
libinput_tests_InputTransport_test libinput_tests_VelocityTracker_test
&& adb push out/target/product/taimen/data/nativetest/libinput_tests/
/data/nativetest/
then run the above tests individually, for example
/data/nativetest/libinput_tests # ./InputPublisherAndConsumer_test
and others in a similar manner

Change-Id: Ia030cdbfa22d2bf7bdf6274a337b059ca3f9a6c3
diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp
index 0312185..906794a 100644
--- a/services/inputflinger/InputDispatcher.cpp
+++ b/services/inputflinger/InputDispatcher.cpp
@@ -1993,10 +1993,10 @@
             const PointerCoords* usingCoords = motionEntry->pointerCoords;
 
             // Set the X and Y offset depending on the input source.
-            float xOffset, yOffset, scaleFactor;
+            float xOffset, yOffset;
             if ((motionEntry->source & AINPUT_SOURCE_CLASS_POINTER)
                     && !(dispatchEntry->targetFlags & InputTarget::FLAG_ZERO_COORDS)) {
-                scaleFactor = dispatchEntry->scaleFactor;
+                float scaleFactor = dispatchEntry->scaleFactor;
                 xOffset = dispatchEntry->xOffset * scaleFactor;
                 yOffset = dispatchEntry->yOffset * scaleFactor;
                 if (scaleFactor != 1.0f) {
@@ -2009,7 +2009,6 @@
             } else {
                 xOffset = 0.0f;
                 yOffset = 0.0f;
-                scaleFactor = 1.0f;
 
                 // We don't want the dispatch target to know.
                 if (dispatchEntry->targetFlags & InputTarget::FLAG_ZERO_COORDS) {