Page MenuHome GnuPG

Syntax errors in scheme.c
Closed, ResolvedPublic

Description

While building GNUPG on Ubuntu 16.04:

os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=5
compiler.libcxx=libstdc++11
build_type=Release

I get two errors from scehme.c. One is a missing line terminating semicolon, and the other is a missing #ifndef NDEBUG

I fixed them with the following patch:

diff -u tests/gpgscm/scheme.c tests/gpgscm/scheme.c
--- tests/gpgscm/scheme.c       2017-08-28 06:22:54.000000000 -0400
+++ tests/gpgscm/scheme.c       2018-05-03 08:45:09.363496224 -0400
@@ -872,7 +872,7 @@
 {
 #ifdef NDEBUG
   fprintf(stderr,
-         "insufficient reservation\n")
+         "insufficient reservation\n");
 #else
   fprintf(stderr,
          "insufficient %s reservation in line %d\n",
@@ -5615,7 +5615,9 @@
   sc->fcells = 0;
   sc->inhibit_gc = GC_ENABLED;
   sc->reserved_cells = 0;
+#ifndef NDEBUG
   sc->reserved_lineno = 0;
+#endif
   sc->no_memory=0;
   sc->inport=sc->NIL;
   sc->outport=sc->NIL;

My configure command was:

./configure --prefix=/home/matt/.conan/data/gnupg/2.2.7/ntc/stable/package/df27019295e73b3727ef538a64bb9d2a17e3c410 --with-libgpg-error-prefix=/home/matt/.conan/data/gpg_error/1.30/ntc/stable/package/c023db9fc677d4d0b3bd0c20f71385e4cf8a1220 --with-libassuan-prefix=/home/matt/.conan/data/assuan/2.5.1/ntc/stable/package/2a71c67c5f81af1e13f45848e971097a854e13a5 --with-libgcrypt-prefix=/home/matt/.conan/data/gcrypt/1.8.2/ntc/stable/package/2a71c67c5f81af1e13f45848e971097a854e13a5 --with-ksba-prefix=/home/matt/.conan/data/ksba/1.3.5/ntc/stable/package/2a71c67c5f81af1e13f45848e971097a854e13a5 --with-npth-prefix=/home/matt/.conan/data/npth/1.5/ntc/stable/package/c023db9fc677d4d0b3bd0c20f71385e4cf8a1220 --with-zlib-prefix=/home/matt/.conan/data/zlib/1.2.11/conan/stable/package/d358fec34c04bcd89832a09158783c750a3304dc --with-bzip2-prefix=/home/matt/.conan/data/bzip2/1.0.6/lasote/stable/package/76f87539fc90ff313e0b3182641a9bb558a717d2

System excerpts from config.log

uname -m = x86_64
uname -r = 4.4.0-116-generic
uname -s = Linux
uname -v = #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018

Details

Version
2.2.7