Andrew Talbot escribió:
How should one report minor code errors that don't necessarily produce known bad behaviour? To give a concrete example, in msacm32:driver.c acmDriverPriority(), formal parameter dwPriority is of type DWORD, which is unsigned, but it contains a line that reads:
if (dwPriority < 0) dwPriority = -1;
... which can never happen.
Bugzilla seems inappropriate, so does wine-devel. If Coverity has abandoned us, would it be worth having a web/wiki page for posting any such code anomalies, so that the knowledgable might consider fixing them?
Thanks,
-- Andy.
From windowssdk.msdn.microsoft.com:
/dwPriority/
New priority for a global ACM driver identifier. A zero value specifies that the priority of the driver identifier should remain unchanged. A value of 1 specifies that the driver should be placed as the highest search priority driver. A value of - 1 specifies that the driver should be placed as the lowest search priority driver. Priorities are used only for global drivers.
So -1 is actually a documented value for dwPriority. However, you are right in that a DWORD (a typedef for an unsigned long) won't ever return true for a comparison such as dwPriority < 0. I will prepare a patch shortly. The wine-devel list might be actually a good place to post code anomalies, as illustrated by the fact that it caught my attention (because I put that code in the first place :-) ).
Alex Villacís Lasso