Hi Glyn, On Mon, Jan 02, 2006 at 09:36:05PM +0000, Glyn Kennington wrote:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -g -O2 -MT downloads.o -MD -MP -MF ".deps/downloads.Tpo" \ -c -o downloads.o `test -f 'downloads.cc' || echo './'`downloads.cc; \ then mv -f ".deps/downloads.Tpo" ".deps/downloads.Po"; \ else rm -f ".deps/downloads.Tpo"; exit 1; \ fi downloads.cc: In function 'void read_req_cb(int, void*)': downloads.cc:915: error: jump to label 'end' downloads.cc:901: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:897: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:893: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:889: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:885: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action'
Putting the DlAction block within its own scope solves the problem, but I'm sure it's not as simple as that.
Really weird. What compiler are you using? From a distance look like the compiler gets confused trying to catch uninitialized variables. Try declaring 'action' with the other vars with a value: char *cmd = NULL, *url = NULL, *dl_dest = NULL; + DLAction action = DL_ABORT; - DLAction action = dl_win->check_filename(&dl_dest); + action = dl_win->check_filename(&dl_dest); Did you get it to work right? -- Cheers Jorge.-