9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] ramfs question
@ 2008-12-26 12:33 kix
  2008-12-27 17:00 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: kix @ 2008-12-26 12:33 UTC (permalink / raw)
  To: 9fans, kix

Hi,

I am reading the lib9p/ramfs.c file and I can't understand this (in threadmain):

+ Qid q;
+ ...
+ q = fs.tree->root->dir.qid;

Because *q* is not longer used.

Why *q* is defined and assigned?

Thanks

Saludos, kix.






^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] ramfs question
  2008-12-26 12:33 [9fans] ramfs question kix
@ 2008-12-27 17:00 ` Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2008-12-27 17:00 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> + Qid q;
> + ...
> + q = fs.tree->root->dir.qid;
>
> Because *q* is not longer used.
> Why *q* is defined and assigned?

Pragmatically, because the Plan 9 C compilers
don't warn about set and not used for struct values.
It's certainly just a dreg.

Russ


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-27 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-26 12:33 [9fans] ramfs question kix
2008-12-27 17:00 ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).