[Pkg-gnutls-maint] Bug#409778: libgnutls-dev: warnings when compiling sample Posix threading code

Russell Coker russell at coker.com.au
Mon Feb 5 12:27:45 CET 2007


Package: libgnutls-dev
Version: 1.4.4-3
Severity: normal

#include <gnutls/gnutls.h>
#include <gcrypt.h>
#include <errno.h>
#include <pthread.h>
GCRY_THREAD_OPTION_PTHREAD_IMPL;

int main()
{
  /* The order matters.
   */
  gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
  gnutls_global_init();
}

The above is from /usr/share/doc/gnutls-doc/html/gnutls.html.  I compile it
with the following command and get warnings as below:

gcc test.cpp -lstdc++ -lgnutls -W -lpthread
test.cpp:9: warning: missing initializer for member ‘gcry_thread_cbs::read’
test.cpp:9: warning: missing initializer for member ‘gcry_thread_cbs::write’
test.cpp:9: warning: missing initializer for member ‘gcry_thread_cbs::select’
test.cpp:9: warning: missing initializer for member ‘gcry_thread_cbs::waitpid’

The GCRY_THREAD_OPTION_PTHREAD_IMPL macro doesn't initialise all members of
gcry_thread_cbs.  I believe that the sample code should compile with no
warnings and that the fields in question should be initialised to NULL or
a reduced structure that lacks those fields should be used.

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-xen-686
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)

Versions of packages libgnutls-dev depends on:
ii  libc6-dev [libc-dev]        2.3.6.ds1-10 GNU C Library: Development Librari
ii  libgcrypt11-dev             1.2.3-2      LGPL Crypto library - development 
ii  libgnutls13                 1.4.4-3      the GNU TLS library - runtime libr
ii  liblzo-dev                  1.08-3       data compression library (old vers
ii  libopencdk8-dev [libopencdk 0.5.9-2      Open Crypto Development Kit (OpenC
ii  libtasn1-3-dev              0.3.6-2      Manage ASN.1 structures (developme
ii  zlib1g-dev                  1:1.2.3-13   compression library - development

libgnutls-dev recommends no packages.

-- no debconf information




More information about the Pkg-gnutls-maint mailing list