[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] Compiler warnings (again)
[...]
>int count( void ) {
> struct newsgroup * g;
> int i;
>
> g = active;
> i = 0;
> while ( g->name ) {
> i++;
> *(g++); /* let g point to next element of array */
> }
> return i;
>}
>
>Unfortunately, gcc barfs on the *(g++); line with "warning: value
>computed is not used".
g++ increments g to point to the next element. However, you're then trying to
dereference it, and not doing anything with the result.
Just g++ by itself will do.
--
+- David Given ---------------McQ-+ "Gaping from its single obling socket was
| Work: dg@xxxxxxxxxxxxx | scintillating, many fauceted scarlet
| Play: dgiven@xxxxxxxxx | emerald..." --- Jim Theis, _The Eye of
+- http://wired.st-and.ac.uk/~dg -+ Argon_
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list