Ralph Lange wrote:
I know you had an idea for that, but I can't find the mail, so:
Is there a smart way to get revision strings (static const char *id =
"@(#) ...") into C code without producing a compiler warning?
I was using a construct like this:
static const struct sccsid {struct sccsid *p; char *id; } sccsid = {
&id, "$Id$"
}
But I just discovered online that the right way to do it seems to be this:
static const char sccsid[] = "$Id$";
When using an array instead of a pointer, gcc doesn't warn.
I'm about to commit that * => [] change to src/ca/cac.cpp,
src/misc/epicsRelease.c, src/cas/generic/caServerI.cc,
src/libCom/osi/devLib.c and src/libCom/osi/epicsTime.cpp to fix the
warnings from those files...
- Andrew
--
There is considerable overlap between the intelligence of the smartest
bears and the dumbest tourists -- Yosemite National Park Ranger
- Navigate by Date:
- Prev:
Re: 3.14.9 schedule Andrew Johnson
- Next:
R3-14-9-pre1 on Monday Andrew Johnson
- Index:
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: 3.14.9 schedule Andrew Johnson
- Next:
R3-14-9-pre1 on Monday Andrew Johnson
- Index:
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|