Initialize variables before calling QModbusPdu::decodeData()
The method uses QDataStream internally, which might leave the passed
parameter unmodified in case of an internal error.
So make sure to initialize the variables with some reasonable defaults
before calling decodeData().
In most cases this might not be strictly needed, because we do have
preceeding checks that the raw data has enough bytes. Still, while
doing this changes, I identified a couple of places where such checks
are missing.
Pick-to: 6.9 6.8 6.5
Change-Id: I2e2fe1cc41a4f7082cf8fea880c16aa7b6a8d418
Reviewed-by: André Hartmann <aha_1980@gmx.de>