zpl-c / enet

⚡️ ENet reliable UDP networking library
https://blog.zpl.pw
MIT License
703 stars 60 forks source link

Handful of minor warnings and static analysis improvements #35

Closed kcgen closed 2 years ago

kcgen commented 3 years ago

We're planning to use ZPL's Enet on the DOSBox Staging project for serial, nullmodem, and softmodem transport, and hit some issues flagged by the PVS Studio static analyzer.

We want to follow whatever approach you'd prefer to get these fixed up. I can send them all in one ticket, or open one-by-one? Whatever is easier for you to track.

inlife commented 3 years ago

Hey @kcgen

It's awesome!

Let's do it like this, if there are more than 5 tickets then it makes sense to bundle it up into a single one, but if it is 5 or less, we would really appreciate having them separated.

How does that sound?

Cheers

kcgen commented 3 years ago

Thank you @inlife!

Here's the analysis package (self-contained meant for offline viewing):

pvs-report-2021-11-16_T0216-d414a30d.tar.gz

Unzip it and then open the index.html inside the general/ directory to bring up an interactive table:

2021-11-16_08-49


The source:line link will jump into the code:

2021-11-16_09-12


The Code-number (V641 in the above), will take you to a discussion with code examples on how to fix it, like this.

We're happy to help as well.

kcgen commented 2 years ago

@inlife , if we can help solve some of these, would you be open to use pushing them as PR's here?

inlife commented 2 years ago

For sure!