Um, I made that scan for the master branch, not 0.41 Don't worry about it.
FWIW, the atan2 one is a false positive, the others are now fixed.
OpenMW 0.41.0
Re: OpenMW 0.41.0
For the atan2 false positive, I don't understand what's happening so I might be saying something stupid, but does Coverity just think it's wrong because it sees variable names with x and y in the opposite order? Would it make sense to just store x and y as oppositely named variables and then pass them on in the order Coverity expects, maybe with an explanatory comment? Might help avoid more misunderstandings in the future.
- psi29a
- Posts: 5362
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: OpenMW 0.41.0
Ah, purely coincidence that the tag was made around the time the scan was triggered.scrawl wrote:Um, I made that scan for the master branch, not 0.41 Don't worry about it.
FWIW, the atan2 one is a false positive, the others are now fixed.
Good to know and thanks Scrawl, that is what I wanted to hear.
I'll get on the release for main PPA and Debian when I get back from posting Christmas cards...
Re: OpenMW 0.41.0
Because you've flipped the x and y vectors in the rest of the code? This looks suspicious because atan2 is a piecewise function. You might not be getting what you expect. I haven't looked into what we're doing exactly though..scrawl wrote:FWIW, the atan2 one is a false positive
To those who don't know, you can take away from this function the differing behavior if you flip x and y.
atan2(1,0) = pi/2
atan2(0,1) = 0
If you think your usage is correct, it would be wise to suppress the coverty result, perhaps with local variables set to the dirx diry, and make a comment about it incase someone looks at that code again.
Re: OpenMW 0.41.0
Many applications tend to use 0 degrees as a forward-facing angle. Given that, atan2's Y parameter maps to the right-facing vector component, and the X parameter maps to the forward-facing vector component. However, most 2D and 3D applications use X as the right-facing vector component, and either Y, +Z, or -Z as the forward-facing vector component. So properly mapping that to atan2 makes the X component fit the Y parameter, and the Y/+Z/-Z component fit the X parameter.Jyby wrote:Because you've flipped the x and y vectors in the rest of the code? This looks suspicious because atan2 is a piecewise function.
Re: OpenMW 0.41.0
Shoot, I think I am still waiting on the OSX release package. I am leaving in a few hours and may not be able to do the release until Monday. Sorry for the delay everyone.
Re: OpenMW 0.41.0
No worries, raevol. A release on Monday would be really nice -- just after the Christmas celebrations when everyone is full up and satisfied.
The change log and the videos are ready; let's hope that there are no errors popping up.
The change log and the videos are ready; let's hope that there are no errors popping up.
Re: OpenMW 0.41.0
0.41 is now released on Arch! No need to wait until Monday.