hackers-painters / katana-parser

A CSS parsing library in pure C99
http://hackers-painters.github.io/katana-parser
MIT License
180 stars 40 forks source link

Fix uninitialized value use when parsing pseudos #14

Closed julianeisel closed 6 years ago

julianeisel commented 6 years ago

Valgrind complains about this as "conditional jump or move depends on uninitialized value(s)". Although it was harmless from what I can tell, better to avoid such things.

The KatanaPseudoNotParsed wasn't even used so far. It could be removed, but I think it might be useful for debugging state changes while parsing. Also, the if-statement could be removed entirely if we just wanted to fix the uninitialized value use, that wouldn't change anything. I'd suggest to leave the KatanaSelector.pseudo initialization though, I got fooled into thinking this would be used a bitflag-field for a moment (since random bits were set).