What exact argument is uninitialized?
Now it's difficult to think about that code. I don't understand it right now.
But I suppose that there is no BUG. Maybe there is some condition why the code flow execution is correct always.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was doing something else completely (cleaning up Objective-C code actually) and run analysis in Xcode on whole project. Got ~70+ "warnings" from p7zip sources (which is part of the code). In this particular case Xcode (clang actually) is trying to say that if skip==1 and the loop iterated zero times. ps[--numPs] will refer to junk value. I do NOT know if the loop always iterates at least once - but I guess it might be the case. If you have access to Mac OSX and clang - it may worth running clang on the whole project and pacifying it.
Feel free to reject the bug - I just wanted you to know that the tool exists.
I personally benefited from using it - it found several quite non-obvious conditions leading to potential bugs that were not trivial in my own code.
Leo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What exact argument is uninitialized?
Now it's difficult to think about that code. I don't understand it right now.
But I suppose that there is no BUG. Maybe there is some condition why the code flow execution is correct always.
I was doing something else completely (cleaning up Objective-C code actually) and run analysis in Xcode on whole project. Got ~70+ "warnings" from p7zip sources (which is part of the code). In this particular case Xcode (clang actually) is trying to say that if skip==1 and the loop iterated zero times. ps[--numPs] will refer to junk value. I do NOT know if the loop always iterates at least once - but I guess it might be the case. If you have access to Mac OSX and clang - it may worth running clang on the whole project and pacifying it.
Feel free to reject the bug - I just wanted you to know that the tool exists.
I personally benefited from using it - it found several quite non-obvious conditions leading to potential bugs that were not trivial in my own code.
Leo
Yes, thanks.
I have no mac. So I can't check the code with Xcode now.