[sane-devel] Define Bug in sanei_cderror.h

Petrie, Glen glen.petrie at eitc.epson.com
Thu Aug 23 14:32:48 UTC 2012


All,

 

While testing sane for LSB adoption; I discover that the #define section
in sanei_cderror.h is wrong.   The error was found using LSB compiler
because LSB does not allow undefined defines.

 

========== Original Code

/*

 * To define the enum list of message codes, include this file without

 * defining macro JMESSAGE.  To create a message string table, include
it

 * again with a suitable JMESSAGE definition (see jerror.c for an
example).

 */

#ifndef JMESSAGE

#ifndef CDERROR_H

#define CDERROR_H

/* First time through, define the enum list */

#define JMAKE_ENUM_LIST

#else

/* Repeated inclusions of this file are no-ops unless JMESSAGE is
defined */

#define JMESSAGE(code,string)

#endif /* CDERROR_H */

#endif /* JMESSAGE */

 

========= Corrected Code

 

/*

 * To define the enum list of message codes, include this file without

 * defining macro JMESSAGE.  To create a message string table, include
it

 * again with a suitable JMESSAGE definition (see jerror.c for an
example).

 */

#ifndef JMESSAGE

#ifndef CDERROR_H

#define CDERROR_H

/* First time through, define the enum list */

#define JMAKE_ENUM_LIST

#endif /* CDERROR_H */

#else

/* Repeated inclusions of this file are no-ops unless JMESSAGE is
defined */

#define JMESSAGE(code,string)

#endif /* JMESSAGE */

 

 

Glen

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20120823/6cc50a54/attachment-0001.html>


More information about the sane-devel mailing list