Opened 15 years ago

Closed 15 years ago

#3097 closed enhancement (fixed)

warning: ‘cvsid_aw’ defined but not used

Reported by: Mateusz Łoskot Owned by: warmerdam
Priority: low Milestone:
Component: ConfigBuild Version: svn-trunk
Severity: trivial Keywords: cvsid
Cc:

Description (last modified by Mateusz Łoskot)

Compilation of GDAL (SVN trunk) throws a lot of the following warnings:

warning: ‘cvsid_aw’ defined but not used

AFAIU, cvsid_aw is depracated and no longer used, so may be it would be a good idea to get rid of it.

Compiler: GCC 4.3.x and 4.4.x

Change History (3)

comment:1 by warmerdam, 15 years ago

Component: defaultConfigBuild
Keywords: deprecated removed
Status: newassigned

I believe this method is still being used to embed SVN messages in the generated object code, dlls and executables despite the name being CVS oriented.

What compilter are you getting this warning with? The cvsid_aw function was introduced to avoid warnings about the string not being used (or perhaps to avoid it being optimized out), so perhaps we could find a more reliable way of embedding the string without helpful compilers complaining or interfering?

Any ideas?

comment:2 by Mateusz Łoskot, 15 years ago

Description: modified (diff)

comment:3 by Even Rouault, 15 years ago

Resolution: fixed
Status: assignedclosed

Using the GCC attribute((used)) attribute prevents it from discarding symbols it would consider unused. This was apparently designed when accessing data from inline asm, but that should do the trick here.

Commited in trunk in r17554

Note: See TracTickets for help on using tickets.