Commit fbfb165d authored by Andrey Turkin's avatar Andrey Turkin Committed by Alexandre Julliard

wordpad: Fix some compile-time warnings.

parent c53b7723
......@@ -135,7 +135,7 @@ static LONG twips_to_centmm(int twips)
return MulDiv(twips, 1000, TWIPS_PER_CM);
}
LONG centmm_to_twips(int mm)
static LONG centmm_to_twips(int mm)
{
return MulDiv(mm, TWIPS_PER_CM, 1000);
}
......@@ -620,7 +620,7 @@ LRESULT CALLBACK ruler_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
return 0;
}
void draw_preview_page(HDC hdc, HDC* hdcSized, FORMATRANGE* lpFr, float ratio, int bmNewWidth, int bmNewHeight, int bmWidth, int bmHeight)
static void draw_preview_page(HDC hdc, HDC* hdcSized, FORMATRANGE* lpFr, float ratio, int bmNewWidth, int bmNewHeight, int bmWidth, int bmHeight)
{
HBITMAP hBitmapScaled = CreateCompatibleBitmap(hdc, bmNewWidth, bmNewHeight);
HPEN hPen;
......@@ -800,7 +800,7 @@ LRESULT print_preview(HWND hMainWnd)
return 0;
}
void update_preview(HWND hWnd)
static void update_preview(HWND hWnd)
{
RECT rc;
......
......@@ -81,7 +81,7 @@ void registry_set_options(HWND hMainWnd)
HKEY hKey;
DWORD action;
if(registry_get_handle(&hKey, &action, (LPWSTR)key_options) == ERROR_SUCCESS)
if(registry_get_handle(&hKey, &action, key_options) == ERROR_SUCCESS)
{
WINDOWPLACEMENT wp;
DWORD isMaximized;
......@@ -104,7 +104,7 @@ void registry_read_winrect(RECT* rc)
HKEY hKey;
DWORD size = sizeof(RECT);
if(registry_get_handle(&hKey, 0, (LPWSTR)key_options) != ERROR_SUCCESS ||
if(registry_get_handle(&hKey, 0, key_options) != ERROR_SUCCESS ||
RegQueryValueExW(hKey, var_framerect, 0, NULL, (LPBYTE)rc, &size) !=
ERROR_SUCCESS || size != sizeof(RECT))
{
......@@ -122,7 +122,7 @@ void registry_read_maximized(DWORD *bMaximized)
HKEY hKey;
DWORD size = sizeof(DWORD);
if(registry_get_handle(&hKey, 0, (LPWSTR)key_options) != ERROR_SUCCESS ||
if(registry_get_handle(&hKey, 0, key_options) != ERROR_SUCCESS ||
RegQueryValueExW(hKey, var_maximized, 0, NULL, (LPBYTE)bMaximized, &size) !=
ERROR_SUCCESS || size != sizeof(DWORD))
{
......@@ -314,7 +314,7 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
for(i = 0; pFiles[i] && i < FILELIST_ENTRIES; i++)
{
wsprintfW(buffer, var_file, i+1);
RegSetValueExW(hKey, (LPWSTR)&buffer, 0, REG_SZ, (LPBYTE)pFiles[i],
RegSetValueExW(hKey, (LPWSTR)&buffer, 0, REG_SZ, (const BYTE*)pFiles[i],
(lstrlenW(pFiles[i])+1)*sizeof(WCHAR));
}
}
......
......@@ -317,7 +317,7 @@ static void populate_size_list(HWND hSizeListWnd)
HDC hdc = GetDC(hMainWnd);
static const unsigned choices[] = {8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
WCHAR buffer[3];
int i;
size_t i;
DWORD fontStyle;
ZeroMemory(&fmt, sizeof(fmt));
......@@ -440,7 +440,7 @@ static void set_font(LPCWSTR wszFaceName)
populate_size_list(hSizeListWnd);
SendMessageW(hFontListEditWnd, WM_SETTEXT, 0, (LPARAM)(LPWSTR)wszFaceName);
SendMessageW(hFontListEditWnd, WM_SETTEXT, 0, (LPARAM)wszFaceName);
}
static void set_default_font(void)
......@@ -478,7 +478,7 @@ static void on_fontlist_modified(LPWSTR wszNewFaceName)
set_font((LPCWSTR) wszNewFaceName);
}
static void add_font(LPCWSTR fontName, DWORD fontType, HWND hListWnd, NEWTEXTMETRICEXW *ntmc)
static void add_font(LPCWSTR fontName, DWORD fontType, HWND hListWnd, const NEWTEXTMETRICEXW *ntmc)
{
COMBOBOXEXITEMW cbItem;
WCHAR buffer[MAX_PATH];
......@@ -557,7 +557,7 @@ static void dialog_choose_font(void)
}
int CALLBACK enum_font_proc(const LOGFONTW *lpelfe, const TEXTMETRICW *lpntme,
static int CALLBACK enum_font_proc(const LOGFONTW *lpelfe, const TEXTMETRICW *lpntme,
DWORD FontType, LPARAM lParam)
{
HWND hListWnd = (HWND) lParam;
......@@ -565,7 +565,7 @@ int CALLBACK enum_font_proc(const LOGFONTW *lpelfe, const TEXTMETRICW *lpntme,
if(SendMessageW(hListWnd, CB_FINDSTRINGEXACT, -1, (LPARAM)lpelfe->lfFaceName) == CB_ERR)
{
add_font((LPWSTR)lpelfe->lfFaceName, FontType, hListWnd, (NEWTEXTMETRICEXW*)lpntme);
add_font(lpelfe->lfFaceName, FontType, hListWnd, (const NEWTEXTMETRICEXW*)lpntme);
}
return 1;
......@@ -1061,7 +1061,7 @@ static void dialog_viewproperties(void)
{
PROPSHEETPAGEW psp[2];
PROPSHEETHEADERW psh;
int i;
size_t i;
HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtr(hMainWnd, GWLP_HINSTANCE);
LPCPROPSHEETPAGEW ppsp = (LPCPROPSHEETPAGEW)&psp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment