Ticket #593 (closed task: fixed)

Opened 12 months ago

Last modified 7 months ago

11 instances of unused variable 'sccsid' in libsrc/qlib2

Reported by: baker Owned by: somebody
Priority: trivial Milestone: All Platforms
Component: ALL modules Version: 7.9
Keywords: qlib2 Cc:

Description

There are 11 instances of unused variable 'sccsid' in libsrc/qlib2:

$ grep sccsid libsrc/qlib2/*.c
libsrc/qlib2/drm_utils.c:static const char sccsid[] = "$Id: drm_utils.c 6803 2016-09-09 06:06:39Z et $ ";
libsrc/qlib2/ms_pack.c:static const char sccsid[] = "$Id: ms_pack.c 6851 2016-10-20 19:14:14Z kevin $ ";
libsrc/qlib2/ms_pack2.c:static const char sccsid[] = "$Id: ms_pack2.c,v 1.7 2013/09/17 18:10:36 doug Exp $ ";
libsrc/qlib2/ms_unpack.c:static const char sccsid[] = "$Id: ms_unpack.c 6803 2016-09-09 06:06:39Z et $ ";
libsrc/qlib2/ms_utils.c:static const char sccsid[] = "$Id: ms_utils.c 6803 2016-09-09 06:06:39Z et $ ";
libsrc/qlib2/pack.c:static const char sccsid[] = "$Id: pack.c 6803 2016-09-09 06:06:39Z et $ ";
libsrc/qlib2/qda_utils.c:static const char sccsid[] = "$Id: qda_utils.c 6803 2016-09-09 06:06:39Z et $ ";
libsrc/qlib2/qtime.c:static const char sccsid[] = "$Id: qtime.c 6803 2016-09-09 06:06:39Z et $ ";
libsrc/qlib2/qutils.c:static const char sccsid[] = "$Id: qutils.c 6803 2016-09-09 06:06:39Z et $ ";
libsrc/qlib2/sdr_utils.c:static const char sccsid[] = "$Id: sdr_utils.c 6803 2016-09-09 06:06:39Z et $ ";
libsrc/qlib2/unpack.c:static const char sccsid[] = "$Id: unpack.c 6851 2016-10-20 19:14:14Z kevin $ ";

For each one the Mac OS X clang compiler warns, e.g.:

drm_utils.c:40:19: warning: unused variable 'sccsid' [-Wunused-const-variable]
static const char sccsid[] = "$Id: drm_utils.c 6803 2016-09-09 06:06:39Z et $ ";

Each one is enclosed by a lint guard, e.g.:

$ grep -C2 sccsid libsrc/qlib2/drm_utils.c

#ifndef lint
static const char sccsid[] = "$Id: drm_utils.c 6803 2016-09-09 06:06:39Z et $ ";
#endif

What is the point of a static variable that is never used? Does anyone mind if get rid of those lines? All they do is clutter up the make output with noise.

If the actual qlib2 sources are maintained in SCCS and not the Earthworm SVN, can the author get rid of the warnings and submit an update to the Earthworm SVN?

Change History

comment:1 Changed 7 months ago by baker

  • Status changed from new to closed
  • Resolution set to fixed

The upgrade of qlib2 to version 1.55 (2018.137) fixes these warnings.

Fixed in r7457.

Note: See TracTickets for help on using tickets.