[svn] GnuPG - r4853 - in trunk: . agent common g10 jnlib scd
svn author wk
cvs at cvs.gnupg.org
Fri Oct 17 21:18:47 CEST 2008
Author: wk
Date: 2008-10-17 21:18:46 +0200 (Fri, 17 Oct 2008)
New Revision: 4853
Modified:
trunk/ChangeLog
trunk/agent/ChangeLog
trunk/agent/call-scd.c
trunk/agent/command.c
trunk/common/ChangeLog
trunk/common/miscellaneous.c
trunk/common/util.h
trunk/configure.ac
trunk/g10/ChangeLog
trunk/g10/main.h
trunk/g10/pubkey-enc.c
trunk/jnlib/dynload.h
trunk/scd/ChangeLog
trunk/scd/command.c
Log:
Use more warning options with modern GCCs.
Other minor changes.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/ChangeLog 2008-10-17 19:18:46 UTC (rev 4853)
@@ -1,3 +1,7 @@
+2008-10-17 Werner Koch <wk at g10code.com>
+
+ * configure.ac: Use more warning options with modern GCCs.
+
2008-09-29 Werner Koch <wk at g10code.com>
* configure.ac: Require libgcrypt 1.4.
Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/agent/ChangeLog 2008-10-17 19:18:46 UTC (rev 4853)
@@ -1,3 +1,8 @@
+2008-10-17 Werner Koch <wk at g10code.com>
+
+ * call-scd.c (start_scd) [W32]: Use snprintf again because we now
+ always use the estream variant.
+
2008-10-15 Werner Koch <wk at g10code.com>
* call-scd.c (start_scd): Enable assuan loggging if requested.
Modified: trunk/common/ChangeLog
===================================================================
--- trunk/common/ChangeLog 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/common/ChangeLog 2008-10-17 19:18:46 UTC (rev 4853)
@@ -1,3 +1,7 @@
+2008-10-17 Werner Koch <wk at g10code.com>
+
+ * util.h (snprintf) [W32]: Redefine to estream_snprintf.
+
2008-09-03 Werner Koch <wk at g10code.com>
* convert.c (hex2str): New.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/g10/ChangeLog 2008-10-17 19:18:46 UTC (rev 4853)
@@ -1,9 +1,16 @@
+2008-10-17 Werner Koch <wk at g10code.com>
+
+ * main.h (idea_cipher_warn): Use do while construct in place of an
+ empty definition.
+
2008-10-03 David Shaw <dshaw at jabberwocky.com>
- * main.h, mainproc.c (check_sig_and_print),
- keylist.c (list_keyblock_print), pkclist.c (do_edit_ownertrust),
- keyedit.c (menu_showphoto), photoid.c (generate_photo_id,
- show_photos), misc.c (pct_expando): Add %v and %V expandos so
+ * main.h, mainproc.c (check_sig_and_print)
+ * keylist.c (list_keyblock_print)
+ * pkclist.c (do_edit_ownertrust)
+ * keyedit.c (menu_showphoto)
+ * photoid.c (generate_photo_id, show_photos)
+ * misc.c (pct_expando): Add %v and %V expandos so
that displaying photo IDs can show the attribute validity
tag (%v) and string (%V). Originally by Daniel Gillmor.
Modified: trunk/scd/ChangeLog
===================================================================
--- trunk/scd/ChangeLog 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/scd/ChangeLog 2008-10-17 19:18:46 UTC (rev 4853)
@@ -1,3 +1,8 @@
+2008-10-16 Werner Koch <wk at g10code.com>
+
+ * command.c (cmd_disconnect): New dummy command.
+ (register_commands): Register command.
+
2008-10-15 Werner Koch <wk at g10code.com>
* command.c (scd_command_handler): Return true if there is no more
Modified: trunk/agent/call-scd.c
===================================================================
--- trunk/agent/call-scd.c 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/agent/call-scd.c 2008-10-17 19:18:46 UTC (rev 4853)
@@ -381,10 +381,8 @@
char buf[100];
#ifdef HAVE_W32_SYSTEM
- /* Use estream snprintf due to a bug in mingw32 related to the l
- modifier. */
- estream_snprintf (buf, sizeof buf, "OPTION event-signal=%lx",
- (unsigned long)get_agent_scd_notify_event ());
+ snprintf (buf, sizeof buf, "OPTION event-signal=%lx",
+ (unsigned long)get_agent_scd_notify_event ());
#else
snprintf (buf, sizeof buf, "OPTION event-signal=%d", SIGUSR2);
#endif
Modified: trunk/agent/command.c
===================================================================
--- trunk/agent/command.c 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/agent/command.c 2008-10-17 19:18:46 UTC (rev 4853)
@@ -80,7 +80,7 @@
-/* To help polling clients, we keep tarck of the number of certain
+/* To help polling clients, we keep track of the number of certain
events. This structure keeps those counters. The counters are
integers and there should be no problem if they are overflowing as
callers need to check only whether a counter changed. The actual
Modified: trunk/common/miscellaneous.c
===================================================================
--- trunk/common/miscellaneous.c 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/common/miscellaneous.c 2008-10-17 19:18:46 UTC (rev 4853)
@@ -31,6 +31,8 @@
static void
my_gcry_logger (void *dummy, int level, const char *fmt, va_list arg_ptr)
{
+ (void)dummy;
+
/* Map the log levels. */
switch (level)
{
@@ -51,6 +53,8 @@
static void
my_gcry_fatalerror_handler (void *opaque, int rc, const char *text)
{
+ (void)opaque;
+
log_fatal ("libgcrypt problem: %s\n", text ? text : gpg_strerror (rc));
abort ();
}
@@ -64,6 +68,8 @@
{
static int been_here; /* Used to protect against recursive calls. */
+ (void)opaque;
+
if (!been_here)
{
been_here = 1;
@@ -140,6 +146,8 @@
#define tohex(n) ((n) < 10 ? ((n) + '0') : (((n) - 10) + 'A'))
const unsigned char *s;
+ (void)reserved;
+
for (s = buffer; length; s++, length--)
{
putc ( tohex ((*s>>4)&15), fp);
Modified: trunk/common/util.h
===================================================================
--- trunk/common/util.h 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/common/util.h 2008-10-17 19:18:46 UTC (rev 4853)
@@ -46,7 +46,13 @@
#define asprintf estream_asprintf
#define vasprintf estream_vasprintf
+/* Due to a bug in mingw32's snprintf related to the 'l' modifier we
+ better use our snprintf. */
+#ifdef HAVE_W32_SYSTEM
+#define snprintf estream_snprintf
+#endif
+
/* GCC attributes. */
#if __GNUC__ >= 4
# define GNUPG_GCC_A_SENTINEL(a) __attribute__ ((sentinel(a)))
@@ -260,6 +266,7 @@
static inline char *
ttyname (int fd)
{
+ (void)fd;
return NULL;
}
#endif /* !HAVE_TTYNAME */
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/configure.ac 2008-10-17 19:18:46 UTC (rev 4853)
@@ -1248,6 +1248,24 @@
if test "$USE_MAINTAINER_MODE" = "yes"; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
+ AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
+ _gcc_cflags_save=$CFLAGS
+ CFLAGS="-Wno-missing-field-initializers"
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
+ AC_MSG_RESULT($_gcc_wopt)
+ CFLAGS=$_gcc_cflags_save;
+ if test x"$_gcc_wopt" = xyes ; then
+ CFLAGS="$CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers"
+ fi
+ AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement])
+ _gcc_cflags_save=$CFLAGS
+ CFLAGS="-Wdeclaration-after-statement"
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
+ AC_MSG_RESULT($_gcc_wopt)
+ CFLAGS=$_gcc_cflags_save;
+ if test x"$_gcc_wopt" = xyes ; then
+ CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+ fi
else
CFLAGS="$CFLAGS -Wall"
fi
Modified: trunk/g10/main.h
===================================================================
--- trunk/g10/main.h 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/g10/main.h 2008-10-17 19:18:46 UTC (rev 4853)
@@ -93,7 +93,7 @@
#ifdef USE_IDEA
void idea_cipher_warn( int show );
#else
-#define idea_cipher_warn(a)
+#define idea_cipher_warn(a) do { } while (0)
#endif
struct expando_args
Modified: trunk/g10/pubkey-enc.c
===================================================================
--- trunk/g10/pubkey-enc.c 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/g10/pubkey-enc.c 2008-10-17 19:18:46 UTC (rev 4853)
@@ -246,7 +246,7 @@
log_info(_("cipher algorithm %d%s is unknown or disabled\n"),
dek->algo, dek->algo == CIPHER_ALGO_IDEA? " (IDEA)":"");
if(dek->algo==CIPHER_ALGO_IDEA)
- idea_cipher_warn(0);
+ idea_cipher_warn (0);
}
dek->algo = 0;
goto leave;
Modified: trunk/jnlib/dynload.h
===================================================================
--- trunk/jnlib/dynload.h 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/jnlib/dynload.h 2008-10-17 19:18:46 UTC (rev 4853)
@@ -31,6 +31,7 @@
dlopen (const char * name, int flag)
{
void * hd = LoadLibrary (name);
+ (void)flag;
return hd;
}
Modified: trunk/scd/command.c
===================================================================
--- trunk/scd/command.c 2008-10-17 13:12:11 UTC (rev 4852)
+++ trunk/scd/command.c 2008-10-17 19:18:46 UTC (rev 4853)
@@ -1638,6 +1638,19 @@
}
+/* DISCONNECT
+
+ TBD
+
+*/
+static int
+cmd_disconnect (assuan_context_t ctx, char *line)
+{
+ return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
+}
+
+
+
/* APDU [--atr] [--more] [hexstring]
Send an APDU to the current reader. This command bypasses the high
@@ -1756,6 +1769,7 @@
{ "UNLOCK", cmd_unlock },
{ "GETINFO", cmd_getinfo },
{ "RESTART", cmd_restart },
+ { "DISCONNECT", cmd_disconnect },
{ "APDU", cmd_apdu },
{ NULL }
};
More information about the Gnupg-commits
mailing list