[Openswan dev] [Openswan Users] Error when build openswan-2.6.25 and git version on arch

D. Hugh Redelmeier hugh at mimosa.com
Sat May 8 19:28:02 EDT 2010

| From: Paul Wouters <paul at xelerance.com>

| On Fri, 7 May 2010, D. Hugh Redelmeier wrote:
| > - a different compiler is being used (I'm using gcc (GCC) 4.4.1
| >  20090725 (Red Hat 4.4.1-2))
| I believe they used gcc 4.5.0

It looks as if gcc has a new warning -Wenum-compare.  It objects if
constants from different enumerations are compared.  This apparently
matches C++ rules (but not C rules).  As I said, this may well be a
reasonable lint-style warning but it warns about perfectly reasonable
uses of C enums.

The code in Openswan that gets warned about is in the confread program
so I don't know much about it.

It appears that the only uses of KEY_STRINGS_MAX are in assert
statements.  They could be rewritten to void the need for

KEY_NUMERIC_MAX is used in asserts but it is also used to dimension a
couple of array types.

The proposed patch to add casts appears to be a reasonable fix.  Yuck.

More information about the Dev mailing list