• Tor Lillqvist's avatar
    Avoid "jump to case label crosses initialization" errors with gcc 4.2.1 · 15759b8c
    Tor Lillqvist yazdı
    Reduce scope of variables declared inside a switch statement. OK, so
    make those code snippets into blocks then, to reduce the scope of
    those variables. Workaround for weird errors as reported by gcc 4.2.1
    in the 10.6 SDK:
    
    SalAquaPicker.cxx: In member function 'void SalAquaPicker::implInitialize()':
    SalAquaPicker.cxx:134: error: jump to case label
    SalAquaPicker.cxx:127: error:   crosses initialization of 'NSNumber* pExtn'
    SalAquaPicker.cxx:126: error:   crosses initialization of 'NSUserDefaults* pDefaults'
    SalAquaPicker.cxx:141: error: jump to case label
    SalAquaPicker.cxx:127: error:   crosses initialization of 'NSNumber* pExtn'
    SalAquaPicker.cxx:126: error:   crosses initialization of 'NSUserDefaults* pDefaults'
    15759b8c
SalAquaPicker.cxx 8.5 KB