[svn] GpgOL - r273 - in trunk: . src

svn author wk cvs at cvs.gnupg.org
Fri Oct 17 21:04:00 CEST 2008


Author: wk
Date: 2008-10-17 21:04:00 +0200 (Fri, 17 Oct 2008)
New Revision: 273

Modified:
   trunk/configure.ac
   trunk/src/ChangeLog
   trunk/src/config-dialog.c
   trunk/src/display.cpp
   trunk/src/engine-assuan.c
   trunk/src/engine-gpgme.c
   trunk/src/ext-commands.cpp
   trunk/src/main.c
   trunk/src/mapihelp.cpp
   trunk/src/message-events.cpp
   trunk/src/mimemaker.c
   trunk/src/mimeparser.c
   trunk/src/property-sheets.cpp
   trunk/src/recipient-dialog.c
   trunk/src/user-events.cpp
   trunk/src/w32-gettext.c
Log:
use more gcc warnings.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/ChangeLog	2008-10-17 19:04:00 UTC (rev 273)
@@ -1,5 +1,8 @@
 2008-10-17  Werner Koch  <wk at g10code.com>
 
+	* recipient-dialog.c (load_rsetbox): Remove superfluous check on
+	negativness for an unsigned variable.
+
 	* mimeparser.c (mime_verify_opaque): Remove extra semicolon which
 	shortcuted most of the code.  Why didn't gcc notice that?  Bug
 	was introduced on 2008-06-12.

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/configure.ac	2008-10-17 19:04:00 UTC (rev 273)
@@ -195,8 +195,20 @@
     if test "$USE_MAINTAINER_MODE" = "yes"; then
         CFLAGS="$CFLAGS -Wcast-align -Wshadow -Wstrict-prototypes"
         CFLAGS="$CFLAGS -Wno-format-y2k -Wformat-security"
+        CFLAGS="$CFLAGS -W -Wno-sign-compare"
         CXXFLAGS="$CXXFLAGS -Wcast-align -Wshadow"
         CXXFLAGS="$CXXFLAGS -Wno-format-y2k -Wformat-security"
+        CXXFLAGS="$CXXFLAGS -W -Wno-sign-compare"
+        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_mfi=yes,_gcc_mfi=no)
+        AC_MSG_RESULT($_gcc_mfi)
+        CFLAGS=$_gcc_cflags_save;
+        if test x"$_gcc_mfi" = xyes ; then
+          CFLAGS="$CFLAGS  -Wno-missing-field-initializers"
+          CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers"
+        fi
     fi
 fi
 

Modified: trunk/src/config-dialog.c
===================================================================
--- trunk/src/config-dialog.c	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/config-dialog.c	2008-10-17 19:04:00 UTC (rev 273)
@@ -150,6 +150,8 @@
   char name[MAX_PATH+1];
   int n;
   const char *s;
+
+  (void)lparam;
   
   switch (msg) 
     {

Modified: trunk/src/display.cpp
===================================================================
--- trunk/src/display.cpp	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/display.cpp	2008-10-17 19:04:00 UTC (rev 273)
@@ -221,6 +221,9 @@
   HWND window;
   struct find_message_window_state findstate;
 
+  (void)is_sensitive;
+  
+
   memset (&findstate, 0, sizeof findstate);
   window = find_message_window (hwnd, &findstate);
   if (window && !is_html)

Modified: trunk/src/engine-assuan.c
===================================================================
--- trunk/src/engine-assuan.c	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/engine-assuan.c	2008-10-17 19:04:00 UTC (rev 273)
@@ -1247,6 +1247,7 @@
 void
 engine_assuan_cancel (void *cancel_data)
 {
+  (void)cancel_data;
   /* FIXME */
 }
 
@@ -1289,6 +1290,8 @@
   work_item_t item;
   int created = 0;
 
+  (void)ctx;
+
   EnterCriticalSection (&work_queue_lock);
   for (item = work_queue; item; item = item->next)
     if (!item->used)

Modified: trunk/src/engine-gpgme.c
===================================================================
--- trunk/src/engine-gpgme.c	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/engine-gpgme.c	2008-10-17 19:04:00 UTC (rev 273)
@@ -439,6 +439,8 @@
   gpgme_ctx_t ctx = NULL;
   gpgme_key_t *keys = NULL;
 
+  (void)hwnd;
+
   cld = xcalloc (1, sizeof *cld);
   cld->closure = encrypt_closure;
   cld->filter = filter;
@@ -503,6 +505,8 @@
 static void
 sign_closure (closure_data_t cld, gpgme_ctx_t ctx, gpg_error_t err)
 {
+  (void)ctx;
+
   update_passphrase_cache (err, &cld->pw_cb);
   engine_private_finished (cld->filter, err);
 }
@@ -521,6 +525,8 @@
   gpgme_ctx_t ctx = NULL;
   gpgme_key_t sign_key = NULL;
 
+  (void)hwnd;
+
   if (signer_dialog_box (&sign_key, NULL, 0) == -1)
     {
       log_debug ("%s:%s: leave (dialog failed)\n", SRCNAME, __func__);
@@ -628,6 +634,8 @@
   closure_data_t cld;
   gpgme_ctx_t ctx = NULL;
   
+  (void)hwnd;
+
   cld = xcalloc (1, sizeof *cld);
   cld->closure = decrypt_closure;
   cld->filter = filter;
@@ -706,6 +714,8 @@
   gpgme_ctx_t ctx = NULL;
   gpgme_data_t sigobj = NULL;
 
+  (void)hwnd;
+
   cld = xcalloc (1, sizeof *cld);
   cld->closure = verify_closure;
   cld->filter = filter;

Modified: trunk/src/ext-commands.cpp
===================================================================
--- trunk/src/ext-commands.cpp	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/ext-commands.cpp	2008-10-17 19:04:00 UTC (rev 273)
@@ -388,6 +388,7 @@
   VARIANT aVariant;
   int force_encrypt = 0;
 
+  (void)hMenu;
   
   if (debug_commands)
     log_debug ("%s:%s: context=%s flags=0x%lx\n", SRCNAME, __func__, 
@@ -880,6 +881,7 @@
 STDMETHODIMP_(VOID) 
 GpgolExtCommands::InitMenu(LPEXCHEXTCALLBACK eecb) 
 {
+  (void)eecb;
 }
 
 
@@ -890,6 +892,8 @@
 STDMETHODIMP 
 GpgolExtCommands::Help (LPEXCHEXTCALLBACK eecb, UINT nCommandID)
 {
+  (void)eecb;
+
   if (nCommandID == m_nCmdProtoAuto
            && m_lContext == EECONTEXT_SENDNOTEMESSAGE) 
     {
@@ -1036,6 +1040,9 @@
 {
   toolbar_info_t tb_info;
 
+  (void)description_size;
+  (void)flags;
+
   for (tb_info = m_toolbar_info; tb_info; tb_info = tb_info->next )
     if (tb_info->button_id == buttonid
         && tb_info->context == m_lContext)
@@ -1101,6 +1108,9 @@
 STDMETHODIMP 
 GpgolExtCommands::ResetToolbar (ULONG lToolbarID, ULONG lFlags)
 {	
+  (void)lToolbarID;
+  (void)lFlags;
+  
   return S_OK;
 }
 

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/main.c	2008-10-17 19:04:00 UTC (rev 273)
@@ -155,6 +155,8 @@
 int WINAPI
 DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved)
 {
+  (void)reserved;
+
   if (reason == DLL_PROCESS_ATTACH)
     {
       set_global_hinstance (hinst);

Modified: trunk/src/mapihelp.cpp
===================================================================
--- trunk/src/mapihelp.cpp	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/mapihelp.cpp	2008-10-17 19:04:00 UTC (rev 273)
@@ -2467,6 +2467,9 @@
 get_message_content_type_cb (void *dummy_arg,
                              rfc822parse_event_t event, rfc822parse_t msg)
 {
+  (void)dummy_arg;
+  (void)msg;
+
   if (event == RFC822PARSE_T2BODY)
     return 42; /* Hack to stop the parsing after having read the
                   outer headers. */

Modified: trunk/src/message-events.cpp
===================================================================
--- trunk/src/message-events.cpp	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/message-events.cpp	2008-10-17 19:04:00 UTC (rev 273)
@@ -409,6 +409,8 @@
 STDMETHODIMP 
 GpgolMessageEvents::OnCheckNames(LPEXCHEXTCALLBACK eecb)
 {
+  (void)eecb;
+
   log_debug ("%s:%s: received\n", SRCNAME, __func__);
   return S_FALSE;
 }
@@ -420,6 +422,9 @@
 STDMETHODIMP 
 GpgolMessageEvents::OnCheckNamesComplete (LPEXCHEXTCALLBACK eecb,ULONG flags)
 {
+  (void)eecb;
+  (void)flags;
+
   log_debug ("%s:%s: received\n", SRCNAME, __func__);
   return S_FALSE;
 }
@@ -432,6 +437,8 @@
 STDMETHODIMP 
 GpgolMessageEvents::OnSubmit (LPEXCHEXTCALLBACK eecb)
 {
+  (void)eecb;
+
   log_debug ("%s:%s: received\n", SRCNAME, __func__);
   m_bOnSubmitActive = TRUE;
   m_bWriteFailed = FALSE;
@@ -444,6 +451,9 @@
 STDMETHODIMP_ (VOID) 
 GpgolMessageEvents::OnSubmitComplete (LPEXCHEXTCALLBACK eecb, ULONG flags)
 {
+  (void)eecb;
+  (void)flags;
+
   log_debug ("%s:%s: received\n", SRCNAME, __func__);
   m_bOnSubmitActive = FALSE; 
 }

Modified: trunk/src/mimemaker.c
===================================================================
--- trunk/src/mimemaker.c	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/mimemaker.c	2008-10-17 19:04:00 UTC (rev 273)
@@ -690,7 +690,7 @@
      0: Plain ASCII.
      1: Quoted Printable
      2: Base64  */
-static const int
+static int
 infer_content_encoding (const void *data, size_t datalen)
 {
   const unsigned char *p;

Modified: trunk/src/mimeparser.c
===================================================================
--- trunk/src/mimeparser.c	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/mimeparser.c	2008-10-17 19:04:00 UTC (rev 273)
@@ -1180,6 +1180,7 @@
   size_t sig_len;
   engine_filter_t filter = NULL;
 
+  (void)protocol;
   /* Note: PROTOCOL is not used here but figured out directly while
      collecting the message.  Eventually it might help use setup a
      proper verification context right at startup to avoid collecting

Modified: trunk/src/property-sheets.cpp
===================================================================
--- trunk/src/property-sheets.cpp	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/property-sheets.cpp	2008-10-17 19:04:00 UTC (rev 273)
@@ -98,6 +98,9 @@
                                  //  containing the number of property 
                                  //  sheets actually used.
 {
+  (void)pEECB;
+  (void)lFlags;
+  
   pPSP[0].dwSize = sizeof (PROPSHEETPAGE);
   pPSP[0].dwFlags = PSP_DEFAULT | PSP_HASHELP;
   pPSP[0].hInstance = glob_hinst;
@@ -117,6 +120,9 @@
 
 STDMETHODIMP_ (VOID) 
 GpgolPropertySheets::FreePages (LPPROPSHEETPAGE pPSP,
-                                      ULONG lFlags, ULONG lPSP)
+                                ULONG lFlags, ULONG lPSP)
 {
+  (void)pPSP;
+  (void)lFlags;
+  (void)lPSP;
 }

Modified: trunk/src/recipient-dialog.c
===================================================================
--- trunk/src/recipient-dialog.c	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/recipient-dialog.c	2008-10-17 19:04:00 UTC (rev 273)
@@ -221,7 +221,7 @@
 	}
       
       val = key->uids->validity;
-      if (val < 0 || val > 5) 
+      if (val > 5) 
 	val = 0;
       strcpy (keybuf, trust_items[val]);
       s = keybuf;

Modified: trunk/src/user-events.cpp
===================================================================
--- trunk/src/user-events.cpp	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/user-events.cpp	2008-10-17 19:04:00 UTC (rev 273)
@@ -198,6 +198,8 @@
 STDMETHODIMP_ (VOID)
 GpgolUserEvents::OnObjectChange (LPEXCHEXTCALLBACK eecb) 
 { 
+  (void)eecb;
+  
   if (debug_commands)
     log_debug ("%s:%s: received\n", SRCNAME, __func__);
 }

Modified: trunk/src/w32-gettext.c
===================================================================
--- trunk/src/w32-gettext.c	2008-10-17 18:22:02 UTC (rev 272)
+++ trunk/src/w32-gettext.c	2008-10-17 19:04:00 UTC (rev 273)
@@ -773,6 +773,8 @@
   LANGID langid;
   int primary, sub;
 
+  (void)category;
+
   /* Let the user override the system settings through environment
      variables, as on POSIX systems.  */
   retval = getenv ("LC_ALL");
@@ -1778,6 +1780,8 @@
 char *
 dgettext (const char *domainname, const char *msgid)
 {
+  (void)domainname;
+
   /* For now, support only one domain.  */
   return (char*)gettext (msgid);
 }




More information about the Gnupg-commits mailing list