Re: [PATCH] avoid assigning string constants to char *
"Bernhard R. Link" <[email protected]>
| Newsgroups | gmane.comp.window-managers.ratpoison.devel |
|---|---|
| Message-ID | <[email protected]> |
* Jérémie Courrèges-Anglas <[email protected]> [140325 11:45]: > I'm not sure what to think about this patch. A few months ago I went > the same way, adding const wherever I could. Then I looked at the > monster diff and found it was either incomplete or useless if it didn't > bring any benefit (say, no needless data duplication). One advantage is that it is an easy way to make sure you never run free() on a string constant. A other minor advantage is that compiling ratpoison with -Wwrite-strings no longer produces any warnings. ;-) Bernhard R. Link -- F8AC 04D5 0B9B 064B 3383 C3DA AFFC 96D1 151D FFDC