[Winpt-commits] r65 - in trunk: Include Src
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Thu Nov 3 17:55:26 CET 2005
Author: twoaday
Date: 2005-11-03 17:55:25 +0100 (Thu, 03 Nov 2005)
New Revision: 65
Modified:
trunk/Include/wptKeyManager.h
trunk/Src/ChangeLog
trunk/Src/wptCardDlg.cpp
trunk/Src/wptClipEditDlg.cpp
trunk/Src/wptClipEncryptDlg.cpp
trunk/Src/wptClipSignDlg.cpp
trunk/Src/wptClipSignEncDlg.cpp
trunk/Src/wptFileManagerDlg.cpp
trunk/Src/wptFileStatDlg.cpp
trunk/Src/wptKeyCache.cpp
trunk/Src/wptKeyManagerDlg.cpp
trunk/Src/wptKeyRevokeDlg.cpp
trunk/Src/wptKeysigDlg.cpp
Log:
Minor changes to avoid GCC warnings.
Modified: trunk/Include/wptKeyManager.h
===================================================================
--- trunk/Include/wptKeyManager.h 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Include/wptKeyManager.h 2005-11-03 16:55:25 UTC (rev 65)
@@ -22,7 +22,7 @@
#define WPT_KEYMANAGER_H
#define send_cmd_id( hwnd, id ) \
- PostMessage ((hwnd), WM_COMMAND, MAKEWPARAM ((id), 0), NULL)
+ PostMessage ((hwnd), WM_COMMAND, MAKEWPARAM ((id), 0), 0)
/* possible key flags. */
enum km_flag_t {
Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/ChangeLog 2005-11-03 16:55:25 UTC (rev 65)
@@ -1,3 +1,7 @@
+2005-11-03 Timo Schulz <ts at g10code.com>
+
+ A lot of minor changes to avoid GCC warnings.
+
2005-11-02 Werner Koch <wk at g10code.com>
* WinPT.cpp (WinMain): Disabled PTD version tests.
Modified: trunk/Src/wptCardDlg.cpp
===================================================================
--- trunk/Src/wptCardDlg.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptCardDlg.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -515,8 +515,8 @@
}
switch (LOWORD (wparam)) {
case IDC_CEDIT_CHPIN:
- DialogBoxParam( glob_hinst, (LPCTSTR)IDD_WINPT_CARD_CHPIN, dlg,
- card_changepin_dlg_proc, NULL );
+ DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_CARD_CHPIN, dlg,
+ card_changepin_dlg_proc, 0);
break;
case IDC_CEDIT_NEWKEYS:
@@ -528,7 +528,7 @@
return TRUE;
}
DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_CARD_KEYGEN,
- glob_hwnd, card_keygen_dlg_proc, NULL);
+ glob_hwnd, card_keygen_dlg_proc, 0);
break;
case IDOK:
Modified: trunk/Src/wptClipEditDlg.cpp
===================================================================
--- trunk/Src/wptClipEditDlg.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptClipEditDlg.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -126,7 +126,7 @@
{
OPENFILENAME save;
FILE *fp;
- char *p;
+ char *p=NULL;
char file[300] = "";
DWORD nbytes;
int id;
@@ -228,7 +228,7 @@
case IDC_CLIPEDIT_LOAD:
if (!load_clipboard_from_file (dlg)) {
/* XXX: for some files the code produces a crash! */
- PostMessage (dlg, WM_COMMAND, MAKEWPARAM(IDC_CLIPEDIT_SEND, 0), NULL);
+ PostMessage (dlg, WM_COMMAND, MAKEWPARAM(IDC_CLIPEDIT_SEND, 0), 0);
}
return TRUE;
Modified: trunk/Src/wptClipEncryptDlg.cpp
===================================================================
--- trunk/Src/wptClipEncryptDlg.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptClipEncryptDlg.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -164,7 +164,7 @@
notify = (NMHDR *)lparam;
if (notify && notify->code == NM_DBLCLK &&
notify->idFrom == IDC_ENCRYPT_KEYLIST)
- PostMessage( dlg, WM_COMMAND, MAKEWPARAM( IDOK, 0 ), NULL );
+ PostMessage( dlg, WM_COMMAND, MAKEWPARAM( IDOK, 0 ), 0);
if (notify && notify->code == LVN_COLUMNCLICK &&
notify->idFrom == IDC_ENCRYPT_KEYLIST ) {
NMLISTVIEW *p = (LPNMLISTVIEW) lparam;
Modified: trunk/Src/wptClipSignDlg.cpp
===================================================================
--- trunk/Src/wptClipSignDlg.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptClipSignDlg.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -173,7 +173,7 @@
notify = (NMHDR *)lparam;
if( notify && notify->code == NM_DBLCLK
&& notify->idFrom == IDC_SIGN_KEYLIST )
- PostMessage( dlg, WM_COMMAND, MAKEWPARAM(IDOK, 0), NULL );
+ PostMessage (dlg, WM_COMMAND, MAKEWPARAM(IDOK, 0), 0);
return TRUE;
case WM_SYSCOMMAND:
Modified: trunk/Src/wptClipSignEncDlg.cpp
===================================================================
--- trunk/Src/wptClipSignEncDlg.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptClipSignEncDlg.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -139,7 +139,7 @@
notify = (NMHDR *)lparam;
if (notify && notify->code == NM_DBLCLK
&& notify->idFrom == IDC_SIGNENC_KEYLIST)
- PostMessage (dlg, WM_COMMAND, MAKEWPARAM (IDOK, 0), NULL);
+ PostMessage (dlg, WM_COMMAND, MAKEWPARAM (IDOK, 0), 0);
return TRUE;
case WM_SYSCOMMAND:
Modified: trunk/Src/wptFileManagerDlg.cpp
===================================================================
--- trunk/Src/wptFileManagerDlg.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptFileManagerDlg.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -551,7 +551,7 @@
case ID_FILEMISC_WIPE_FREES:
DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_SPACE_SECDEL, dlg,
- space_wipefrees_dlg_proc, NULL);
+ space_wipefrees_dlg_proc, 0);
break;
case ID_FILEMISC_SELALL:
@@ -575,7 +575,7 @@
case ID_FILEMISC_PREFS:
DialogBoxParam (glob_hinst, (LPCTSTR)IDD_FILE_PREFS, dlg,
- file_preferences_dlg_proc, NULL);
+ file_preferences_dlg_proc, 0);
break;
case ID_FILEMISC_LIST:
Modified: trunk/Src/wptFileStatDlg.cpp
===================================================================
--- trunk/Src/wptFileStatDlg.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptFileStatDlg.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -233,6 +233,9 @@
get_compress_algo(zip->algorithm), zip->len );
listbox_add_string( list, inf ); }
break;
+
+ default:
+ break;
}
gpg_free_packet (pkt);
gpg_init_packet (pkt);
Modified: trunk/Src/wptKeyCache.cpp
===================================================================
--- trunk/Src/wptKeyCache.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptKeyCache.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -112,7 +112,7 @@
const byte *sym_prefs;
char keyid[16+1], *id = NULL;
int key_seen = 0;
- size_t nbytes = 0, nsym =0;
+ size_t nsym =0;
if (secring) {
parse_secring (ctx, kid, secring);
Modified: trunk/Src/wptKeyManagerDlg.cpp
===================================================================
--- trunk/Src/wptKeyManagerDlg.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptKeyManagerDlg.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -350,14 +350,14 @@
separator_wnd_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
static POINT last_mouse_pos;
-
+ RECT rect;
+
if (msg == WM_CREATE)
SetWindowLong (hwnd, GWL_USERDATA, (long)(((CREATESTRUCT*)lparam)->lpCreateParams));
switch (msg) {
case WM_PAINT:
PAINTSTRUCT ps;
- RECT rect;
HPEN hpen;
GetClientRect (hwnd, &rect);
@@ -411,7 +411,6 @@
if (wparam == MK_LBUTTON) {
struct km_info *kmi;
POINT p;
- RECT rect;
if ((kmi = (struct km_info *)GetWindowLong (hwnd, GWL_USERDATA)) == NULL)
break;
@@ -1222,7 +1221,7 @@
return TRUE;
}
dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_CARD_KEYGEN, dlg,
- card_keygen_dlg_proc, NULL, _("Card Key Generation"),
+ card_keygen_dlg_proc, 0, _("Card Key Generation"),
IDS_WINPT_CARD_KEYGEN );
/* XXX: use new code */
if( keycache_get_reload() )
@@ -1240,19 +1239,19 @@
case ID_KEYMISC_SENDRECV:
dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_KEYSERVER, dlg,
- keyserver_dlg_proc, NULL, _("Keyserver Access"),
+ keyserver_dlg_proc, 0, _("Keyserver Access"),
IDS_WINPT_KEYSERVER );
return TRUE;
case ID_KEYMISC_GPGPREFS:
dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_GPGPREFS, dlg,
- gpgprefs_dlg_proc, NULL, _("GnuPG Preferences"),
+ gpgprefs_dlg_proc, 0, _("GnuPG Preferences"),
IDS_WINPT_GPGPREFS );
return TRUE;
case ID_KEYMISC_GPGOPT:
dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_GPGOPT, dlg,
- gpgopt_dlg_proc, NULL, _("GnuPG Options" ),
+ gpgopt_dlg_proc, 0, _("GnuPG Options" ),
IDS_WINPT_GPGOPT );
return TRUE;
@@ -1322,7 +1321,7 @@
case ID_KEYMISC_INFO:
dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_ABOUT, glob_hwnd,
- about_winpt_dlg_proc, NULL, _("About WinPT"),
+ about_winpt_dlg_proc, 0, _("About WinPT"),
IDS_WINPT_ABOUT );
break;
@@ -1332,7 +1331,7 @@
case ID_KEYMISC_OT:
dialog_box_param( glob_hinst, (LPCTSTR)IDD_WINPT_OWNERTRUST, glob_hwnd,
- ownertrust_dlg_proc, NULL,
+ ownertrust_dlg_proc, 0,
_("Ownertrust"), IDS_WINPT_OWNERTRUST );
break;
Modified: trunk/Src/wptKeyRevokeDlg.cpp
===================================================================
--- trunk/Src/wptKeyRevokeDlg.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptKeyRevokeDlg.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -76,7 +76,7 @@
static winpt_key_t k;
gpgme_error_t err;
HWND list;
- int idx, use_desc, chk = 0;
+ int idx, use_desc;
char desc[256], file[256], *p = NULL;
char pwd[256];
char *inp_data = NULL, *revcert=NULL;
@@ -122,7 +122,7 @@
case IDOK:
list = GetDlgItem (dlg, IDC_KEYREVOKE_REASON);
- idx = SendMessage (list, LB_GETCURSEL, NULL, NULL);
+ idx = SendMessage (list, LB_GETCURSEL, 0, 0);
if (idx < 0 || idx > 3) {
msg_box (dlg, _("Please select a reason."),
_("Key Revocation"), MB_ERR);
Modified: trunk/Src/wptKeysigDlg.cpp
===================================================================
--- trunk/Src/wptKeysigDlg.cpp 2005-11-03 16:37:59 UTC (rev 64)
+++ trunk/Src/wptKeysigDlg.cpp 2005-11-03 16:55:25 UTC (rev 65)
@@ -255,7 +255,7 @@
static int
recv_missing_keys (HWND dlg, listview_ctrl_t lv)
{
- int i, n, rc;
+ int i, n, rc=0;
char id[128], keyid[18+1];
n = listview_count_items (lv, 0);
More information about the Winpt-commits
mailing list