RishiGupta12 / SerialPundit

Serial port communication in Java - FTDI D2XX, HID API, X/Y modem
GNU Affero General Public License v3.0
125 stars 56 forks source link

Fix uninitialized variable in cp210x linux driver. #29

Closed DanLipsitt closed 6 years ago

DanLipsitt commented 6 years ago

The flowctrl variable is unintialized, leading to possible corruption and the following compiler warning:

drivers/cp210x-silicon-labs/linux/sp_cp210x.c:839:21: warning: 'flowctrl[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
         flowctrl[0] |= 0x01;
                     ^~
RishiGupta12 commented 6 years ago

I am not getting any error, still I have initialised it. There are few things about cp2102 firmware for which i am waiting for an answer from an engineer. Please share how exactly you are using this driver.

DanLipsitt commented 6 years ago

Thanks. The mainline cp210x kernel module doesn't seem to be working* with the GPIOs on the cp2105, so I was trying to get your driver working. However, I ran into some tracebacks. I might have time to file a report for you this weekend.