summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Hartman <hartmans@mit.edu>2011-10-14 14:40:36 +0000
committerSam Hartman <hartmans@mit.edu>2011-10-14 14:40:36 +0000
commita0216e21ff6d3885557d145c78c8547187cbc83a (patch)
treeb037e6a2f42a63db4b099ee10fd206ffb5693326
parent6b39aeb15325008af22d4efd64a417b41884e326 (diff)
downloadkrb5-a0216e21ff6d3885557d145c78c8547187cbc83a.tar.gz
krb5-a0216e21ff6d3885557d145c78c8547187cbc83a.tar.xz
krb5-a0216e21ff6d3885557d145c78c8547187cbc83a.zip
Fixed some warnings and Windows 64 portability issues in the leash executable
Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25338 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/windows/leash/CLeashDragListBox.cpp2
-rw-r--r--src/windows/leash/Leash.cpp10
-rw-r--r--src/windows/leash/LeashMessageBox.cpp4
-rw-r--r--src/windows/leash/LeashMessageBox.h2
-rw-r--r--src/windows/leash/LeashView.cpp6
-rw-r--r--src/windows/leash/LeashView.h18
6 files changed, 22 insertions, 20 deletions
diff --git a/src/windows/leash/CLeashDragListBox.cpp b/src/windows/leash/CLeashDragListBox.cpp
index 205889b860..2753884301 100644
--- a/src/windows/leash/CLeashDragListBox.cpp
+++ b/src/windows/leash/CLeashDragListBox.cpp
@@ -66,7 +66,7 @@ void CLeashDragListBox::Dropped(int nSrcIndex, CPoint pt)
if (nDestIndex == nSrcIndex || nDestIndex == nSrcIndex+1)
return; //didn't move
CString str1, str2;
- DWORD dwData;
+ DWORD_PTR dwData;
GetText(nSrcIndex, str1);
GetText(nDestIndex, str2);
dwData = GetItemData(nSrcIndex);
diff --git a/src/windows/leash/Leash.cpp b/src/windows/leash/Leash.cpp
index eb2c11026c..dbd2fe5134 100644
--- a/src/windows/leash/Leash.cpp
+++ b/src/windows/leash/Leash.cpp
@@ -37,6 +37,8 @@
#include <errno.h>
+#include <afxwin.h>
+
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
@@ -191,9 +193,9 @@ BOOL CLeashApp::InitInstance()
0 == stricmp(optionParam+1, "i"))
{
LSH_DLGINFO_EX ldi;
- char username[64]="";
- char realm[192]="";
- int i=0, j=0;
+ char username[64]="";
+ char realm[192]="";
+ int i=0, j=0;
TicketList* ticketList = NULL;
if (WaitForSingleObject( ticketinfo.lockObj, INFINITE ) != WAIT_OBJECT_0)
throw("Unable to lock ticketinfo");
@@ -947,7 +949,7 @@ CLeashApp::ValidateConfigFiles()
}
char realmkey[256]="SYSTEM\\CurrentControlSet\\Control\\Lsa\\Kerberos\\Domains\\";
- int keylen = strlen(realmkey)-1;
+ size_t keylen = strlen(realmkey)-1;
if ( domain[0] ) {
strncpy(realm,domain,256);
diff --git a/src/windows/leash/LeashMessageBox.cpp b/src/windows/leash/LeashMessageBox.cpp
index 0fd2182291..fd96bc8286 100644
--- a/src/windows/leash/LeashMessageBox.cpp
+++ b/src/windows/leash/LeashMessageBox.cpp
@@ -61,7 +61,7 @@ END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLeashMessageBox message handlers
-void CALLBACK CLeashMessageBox::MessageBoxTimer(HWND hwnd, UINT uiMsg, UINT idEvent, DWORD dwTime)
+void CALLBACK CLeashMessageBox::MessageBoxTimer(HWND hwnd, UINT uiMsg, UINT_PTR idEvent, DWORD dwTime)
{
::KillTimer(hwnd, 2);
::SendMessage(hwnd, WM_CLOSE, 0, 0);
@@ -76,7 +76,7 @@ void CLeashMessageBox::OnOK()
BOOL CLeashMessageBox::OnInitDialog()
{
CDialog::OnInitDialog();
- UINT idTimer = SetTimer(2, m_dwTime, (TIMERPROC)MessageBoxTimer);
+ UINT_PTR idTimer = SetTimer(2, m_dwTime, &MessageBoxTimer);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
diff --git a/src/windows/leash/LeashMessageBox.h b/src/windows/leash/LeashMessageBox.h
index 57f1360a8e..93174059ab 100644
--- a/src/windows/leash/LeashMessageBox.h
+++ b/src/windows/leash/LeashMessageBox.h
@@ -31,7 +31,7 @@ class CLeashMessageBox : public CDialog
{
private:
static DWORD m_dwTime;
- static void CALLBACK MessageBoxTimer(HWND hwnd, UINT uiMsg, UINT idEvent, DWORD dwTime);
+ static void CALLBACK MessageBoxTimer(HWND hwnd, UINT uiMsg, UINT_PTR idEvent, DWORD dwTime);
// Construction
public:
diff --git a/src/windows/leash/LeashView.cpp b/src/windows/leash/LeashView.cpp
index a2f93336b0..e97ab762d2 100644
--- a/src/windows/leash/LeashView.cpp
+++ b/src/windows/leash/LeashView.cpp
@@ -96,7 +96,7 @@ BEGIN_MESSAGE_MAP(CLeashView, CFormView)
END_MESSAGE_MAP()
-LONG CLeashView::m_ticketTimeLeft = 0; // # of seconds left before tickets expire
+time_t CLeashView::m_ticketTimeLeft = 0; // # of seconds left before tickets expire
INT CLeashView::m_forwardableTicket = 0;
INT CLeashView::m_proxiableTicket = 0;
INT CLeashView::m_renewableTicket = 0;
@@ -242,7 +242,7 @@ VOID CLeashView::OnClose(void)
printf("OnClose\n");
}
-LONG CLeashView::LeashTime()
+time_t CLeashView::LeashTime()
{
_tzset();
return time(0);
@@ -285,7 +285,7 @@ VOID CLeashView::UpdateTicketTime(TICKETINFO& ti)
VOID CALLBACK EXPORT CLeashView::TimerProc(HWND hWnd, UINT nMsg,
- UINT nIDEvent, DWORD dwTime)
+ UINT_PTR nIDEvent, DWORD dwTime)
{
// All of the work is being done in the PreTranslateMessage method
// in order to have access to the object
diff --git a/src/windows/leash/LeashView.h b/src/windows/leash/LeashView.h
index 591bc426fd..36d842306d 100644
--- a/src/windows/leash/LeashView.h
+++ b/src/windows/leash/LeashView.h
@@ -114,8 +114,8 @@ private:
static INT m_warningOfTicketTimeLeftLockKrb5;
static INT m_updateDisplayCount;
static INT m_alreadyPlayedDisplayCount;
- static LONG m_ticketTimeLeft;
- static BOOL m_lowTicketAlarmSound;
+ static time_t m_ticketTimeLeft;
+ static BOOL m_lowTicketAlarmSound;
static LONG m_timerMsgNotInProgress;
VOID ResetTreeNodes();
@@ -130,19 +130,19 @@ private:
//void GetRowWidthHeight(CDC* pDC, LPCSTR theString, int& nRowWidth,
// int& nRowHeight, int& nCharWidth);
static VOID AlarmBeep();
- static VOID CALLBACK EXPORT TimerProc(HWND hWnd, UINT nMsg, UINT nIDEvent,
- DWORD dwTime);
- static VOID UpdateTicketTime(TICKETINFO& ticketinfo);
- static INT GetLowTicketStatus(int);
- static LONG LeashTime();
+ static VOID CALLBACK EXPORT TimerProc(HWND hWnd, UINT nMsg, UINT_PTR nIDEvent,
+ DWORD dwTime);
+ static VOID UpdateTicketTime(TICKETINFO& ticketinfo);
+ static INT GetLowTicketStatus(int);
+ static time_t LeashTime();
void SetTrayIcon(int nim, int state=0);
void SetTrayText(int nim, CString tip);
BOOL UpdateDisplay();
static UINT InitTicket(void *);
- static UINT RenewTicket(void *);
- static UINT ImportTicket(void *);
+ static UINT RenewTicket(void *);
+ static UINT ImportTicket(void *);
protected: // create from serialization only
DECLARE_DYNCREATE(CLeashView)