Em Qui, 2007-11-15 às 09:43 +0800, kevin liu escreveu: > Dear everyone: > I am reading v4l2 tuner part code these days, when I come to mt20xx.c, > in microtune_init(), the use of the char pointer name maybe cause some > fatal error sometimes for this state: > ++++++++++++++++++++++++++++++++++++++++++++++++++ > 507 name = "unknown"; > ++++++++++++++++++++++++++++++++++++++++++++++++++ > while pointer name doesn't have its memory. > And I wonder why gcc can't give any warnings?
Because this works properly and it has a valid syntax/semantic. Any C compiler will add "unknown" string to the data segment and 'name' will point to this area. Cheers, Mauro _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb