On Mon, 19 Apr 2004, Dimitrie O. Paun wrote:
> On Mon, 19 Apr 2004, Francois Gouget wrote:
>> > As for the previous patch it's important to check that the function does
> > not actually try to write to these strings. And indeed there are a few
> > cases where the function modifies the string, typically to change the
> > drive letter in strings like 'A:\'.
>> What about a list of things that weren't "const static"-ied?
> Maybe we should have a policy of having such string as *always*
> "const static" (and maybe have puk's sparse tool warn for non
> conforming ones), and in places where they need to modify them,
> they just copy them on stack explicitly...
AFAIK those that were left-out are not const/static-ifiable. Once the
patches have been applied they can easily be found by running the
following commands:
egrep -r -n . "WCHAR" . | egrep "\\[\\] *= *{ *" | egrep -v "(const|static)"
egrep -r -n . "static *WCHAR" . | egrep "\\[\\] *= *{ *" | grep -v const
egrep -r -n . "const *WCHAR" . | egrep "\\[\\] *= *{ *" | grep -v static
All in all you should get 25 lines.
--
Francois Gouget fgouget at free.frhttp://fgouget.free.fr/
145 = 1! + 4! + 5!