Closed Milerius closed 4 years ago
Nope, that's a bug. Thanks for pointing it out! I'll push a fix immediately.
no problem, you maybe interested to use https://www.viva64.com/en/pvs-studio/
It's free for open source project, since I'm using your library I got the report from your library too @DaanDeMeyer
That's pretty nifty, I'll look into setting up some more static analyzers for reproc including PVS. Of course, you're welcome to keep reporting these things if PVS finds any more.
(I hope the latest changes didn't impact you too heavily, I did some breaking changes but they should be mostly contained to the C library)
TBH with you I'm stick to a specific commits since a moment @DaanDeMeyer I will upgrade when a new release tag will be ready.
There is this one too but seem's to be a false positive @DaanDeMeyer
Ahh, I thought you got the PVS warning because you were following the master branch but the warning was simply from an old version.
The second one is indeed a false positive, although it shouldn't trigger anymore in newer commits as I've completely revised error handling in the C implementation.
Ah yeah that's why, ok I will upgrade once the new tag is release so.
I'll try and get the new version out the door ASAP so you can use a stable release again.
very nice. Recently I liked a lot the approach of the API process from the nim programming langage:
https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/osproc.nim#L66
I liked a lot the API that's look like:
mm2Instance = startProcess(command=toolsPath & "/mm2", args=[$$mm2_cfg], env = nil, options={poParentStreams}, workingDir=toolsPath)
May be you will find the API/code interesting for inspiring ^^'
https://github.com/DaanDeMeyer/reproc/blob/00b8616ec935752985cbc53ad0cef42f9f698358/reproc%2B%2B/include/reproc%2B%2B/detail/array.hpp#L27
Hey, any reason why the variable is assigned twice time here ?