Discussion:
Displaced c++-style comments in net-snmp-5.3.0.1-sourcecode
Joerg Hinz
2006-02-22 06:51:04 UTC
Permalink
Hello,

I noticed some c++-style comments ("// code") in some files in
./agent/mibgroup/disman/event/mte*.

Please remind that if you want to compile it under AIX using CC you have
to change all comments into c-style ("/* code */").

Regards
Joerg
--
Jörg Hinz
***@Linux-Systeme.de
+49 201 - 29 88 311
+49 172 - 7 222 333

Linux-Systeme GmbH
Tenderweg 11, 45141 Essen
www.linux-systeme.de
+49 201 - 29 88 30
Dave Shield
2006-02-22 09:16:04 UTC
Permalink
Post by Joerg Hinz
I noticed some c++-style comments ("// code") in some
files in ./agent/mibgroup/disman/event/mte*.
Yes - those look like temporary removals of code that
should have worked but had been causing problems.
I tend to use C++-style comments for those, to distinguish
them from "real" comments, and remind me that the problem
still needs to be addressed.

Unfortunately, this got overlooked before the 5.3 release
was made. I've updated the 5.3.x branch to fix this, and
these comments should be removed in the next release.

Thanks for letting us know.

Dave
Wes Hardaker
2006-03-07 22:42:07 UTC
Permalink
Post by Joerg Hinz
I noticed some c++-style comments ("// code") in some
files in ./agent/mibgroup/disman/event/mte*.
Dave> Yes - those look like temporary removals of code that
Dave> should have worked but had been causing problems.
Dave> I tend to use C++-style comments for those, to distinguish
Dave> them from "real" comments, and remind me that the problem
Dave> still needs to be addressed.

To prevent this we shouldn't ever check in code with // comments in
it. Period. If you need a reminder, use an XXX or even better a /**
@todo */ doxygen tag.
--
Wes Hardaker
Sparta, Inc.
Dave Shield
2006-03-08 12:25:08 UTC
Permalink
Post by Wes Hardaker
Post by Joerg Hinz
I noticed some c++-style comments ("// code") in some
files in ./agent/mibgroup/disman/event/mte*.
Dave> Yes - those look like temporary removals of code that
Dave> should have worked but had been causing problems.
Dave> I tend to use C++-style comments for those, to distinguish
Dave> them from "real" comments, and remind me that the problem
Dave> still needs to be addressed.
To prevent this we shouldn't ever check in code with // comments in
it. Period.
Agreed.
These are meant to be temporary comments in my local working code.
Post by Wes Hardaker
If you need a reminder, use an XXX ...
Oh, I do - frequently.
Part of the reason for using the // style is to remind me that
a particular change should *not* be checked in until the issue
has been sorted (or at least thought about a bit more).

Unfortunately that process failed this time. Mea culpa.

Dave
Wes Hardaker
2006-03-08 12:40:04 UTC
Permalink
Dave> Part of the reason for using the // style is to remind me that
Dave> a particular change should *not* be checked in until the issue
Dave> has been sorted (or at least thought about a bit more).

#error does something more powerful where you'll get yelled at much
#earlier ;-)
--
Wes Hardaker
Sparta, Inc.
Dave Shield
2006-03-08 12:45:02 UTC
Permalink
Post by Wes Hardaker
Dave> Part of the reason for using the // style is to remind me that
Dave> a particular change should *not* be checked in until the issue
Dave> has been sorted (or at least thought about a bit more).
#error does something more powerful where you'll get yelled at much
#earlier ;-)
But makes it slightly harder to compile and test the main
functionality, before coming back to the particular issue
that needs more thought.

But we're getting away from the point.

You and Joerg are quite correct - // comments are a no-no.
End of story.

Dave

Loading...