> > > I was able to store the event stream in file. I have sent the patch for > > the same. It has only one warning that I have to discuss with you. > > > > ../misc/record/record-main.c:172:14: warning: ‘ns’ may be used > > uninitialized in this function [-Wmaybe-uninitialized] > > ctf_item.ns=ns; > > ^ > > ../misc/record/record-main.c:147:12: note: ‘ns’ was declared here > > uint32_t ns; > > This is not a warning. It is an error. The ns variable is not set in the > else path. >
Should I remove the inner content of if block? Since we are not using fprintf() anymore. > > It should look like this: > > static void print_item( FILE *f, const client_item *item ) > { > ctf_event ctf_item; > > ctf_item.ns = item->ns; > ctf_item.cpu = item->cpu; > ctf_item.event = item->event; > ctf_item.data = item->data; > > fwrite( &ctf_item, sizeof( ctf_item ), 1, f ); > } > Okay -- *Ravindra Kumar Meena*, B. Tech. Computer Science and Engineering, Indian Institute of Technology (Indian School of Mines) <https://www.iitism.ac.in/>, Dhanbad
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel