[poppler] utils/pdftocairo-win32.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Mon Jul 27 05:53:33 PDT 2015
utils/pdftocairo-win32.cc | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
New commits:
commit e6e7d1492b518d57136031a94069a994182693cc
Author: Hib Eris <hib at hiberis.nl>
Date: Sun May 31 12:32:36 2015 +0200
pdftocairo: Fix cast to pointer from integer of different size on win64
Fixes warning:
[ 322s] CXX pdftocairo-pdftocairo-win32.o
[ 324s] In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/windows.h:72:0,
[ 324s] from /usr/x86_64-w64-mingw32/sys-root/mingw/include/cairo/cairo-win32.h:44,
[ 324s] from pdftocairo-win32.cc:16:
[ 324s] pdftocairo-win32.cc: In function 'HWND__* createGroupBox(HWND, HINSTANCE, int, const char*, RECT*)':
[ 324s] pdftocairo-win32.cc:170:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[ 324s] parent, (HMENU)id,
[ 324s] ^
[ 324s] pdftocairo-win32.cc: In function 'HWND__* createCheckBox(HWND, HINSTANCE, int, const char*, RECT*)':
[ 324s] pdftocairo-win32.cc:186:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[ 324s] parent, (HMENU)id,
[ 324s] ^
[ 324s] pdftocairo-win32.cc: In function 'HWND__* createStaticText(HWND, HINSTANCE, int, const char*, RECT*)':
[ 324s] pdftocairo-win32.cc:202:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[ 324s] parent, (HMENU)id,
[ 324s] ^
[ 324s] pdftocairo-win32.cc: In function 'HWND__* createPageScaleComboBox(HWND, HINSTANCE, int, RECT*)':
[ 324s] pdftocairo-win32.cc:219:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[ 324s] parent, (HMENU)id,
[ 324s] ^
https://bugs.freedesktop.org/show_bug.cgi?id=91465
diff --git a/utils/pdftocairo-win32.cc b/utils/pdftocairo-win32.cc
index bf2eac2..78d0425 100644
--- a/utils/pdftocairo-win32.cc
+++ b/utils/pdftocairo-win32.cc
@@ -159,7 +159,7 @@ static void getLocalPos(HWND wind, HWND dlg, RECT *rect)
MapWindowPoints(wind, dlg, (LPPOINT)rect, 2);
}
-static HWND createGroupBox(HWND parent, HINSTANCE hInstance, int id, const char *label, RECT *rect)
+static HWND createGroupBox(HWND parent, HINSTANCE hInstance, HMENU id, const char *label, RECT *rect)
{
HWND hwnd = CreateWindowA(WC_BUTTONA,
label,
@@ -167,7 +167,7 @@ static HWND createGroupBox(HWND parent, HINSTANCE hInstance, int id, const char
rect->left, rect->top,
rect->right - rect->left,
rect->bottom - rect->top,
- parent, (HMENU)id,
+ parent, id,
hInstance, NULL);
HFONT hFont = (HFONT)SendMessage(parent, WM_GETFONT, (WPARAM)0, (LPARAM)0);
if (hFont)
@@ -175,7 +175,7 @@ static HWND createGroupBox(HWND parent, HINSTANCE hInstance, int id, const char
return hwnd;
}
-static HWND createCheckBox(HWND parent, HINSTANCE hInstance, int id, const char *label, RECT *rect)
+static HWND createCheckBox(HWND parent, HINSTANCE hInstance, HMENU id, const char *label, RECT *rect)
{
HWND hwnd = CreateWindowA(WC_BUTTONA,
label,
@@ -183,7 +183,7 @@ static HWND createCheckBox(HWND parent, HINSTANCE hInstance, int id, const char
rect->left, rect->top,
rect->right - rect->left,
rect->bottom - rect->top,
- parent, (HMENU)id,
+ parent, id,
hInstance, NULL);
HFONT hFont = (HFONT)SendMessage(parent, WM_GETFONT, (WPARAM)0, (LPARAM)0);
if (hFont)
@@ -191,7 +191,7 @@ static HWND createCheckBox(HWND parent, HINSTANCE hInstance, int id, const char
return hwnd;
}
-static HWND createStaticText(HWND parent, HINSTANCE hinstance, int id, const char *text, RECT *rect)
+static HWND createStaticText(HWND parent, HINSTANCE hinstance, HMENU id, const char *text, RECT *rect)
{
HWND hwnd = CreateWindowA(WC_STATICA,
text,
@@ -199,7 +199,7 @@ static HWND createStaticText(HWND parent, HINSTANCE hinstance, int id, const cha
rect->left, rect->top,
rect->right - rect->left,
rect->bottom - rect->top,
- parent, (HMENU)id,
+ parent, id,
hinstance, NULL);
HFONT hFont = (HFONT)SendMessage(parent, WM_GETFONT, (WPARAM)0, (LPARAM)0);
if (hFont)
@@ -207,7 +207,7 @@ static HWND createStaticText(HWND parent, HINSTANCE hinstance, int id, const cha
return hwnd;
}
-HWND createPageScaleComboBox(HWND parent, HINSTANCE hinstance, int id, RECT *rect)
+HWND createPageScaleComboBox(HWND parent, HINSTANCE hinstance, HMENU id, RECT *rect)
{
HWND hwnd = CreateWindowA(WC_COMBOBOX,
"",
@@ -216,7 +216,7 @@ HWND createPageScaleComboBox(HWND parent, HINSTANCE hinstance, int id, RECT *rec
rect->left, rect->top,
rect->right - rect->left,
rect->bottom - rect->top,
- parent, (HMENU)id,
+ parent, id,
hinstance, NULL);
HFONT hFont = (HFONT)SendMessage(parent, WM_GETFONT, (WPARAM)0, (LPARAM)0);
if (hFont)
@@ -296,35 +296,35 @@ static UINT_PTR CALLBACK printDialogHookProc(HWND hdlg, UINT uiMsg, WPARAM wPara
pdfGroupBoxRect.right = copiesGroupRect.right;
pdfGroupBoxRect.top = printRangeGroupRect.bottom + interGroupSpace;
pdfGroupBoxRect.bottom = pdfGroupBoxRect.top + groupHeight;
- createGroupBox(hdlg, hinstance, grp3, "PDF Print Options", &pdfGroupBoxRect);
+ createGroupBox(hdlg, hinstance, (HMENU)grp3, "PDF Print Options", &pdfGroupBoxRect);
RECT textRect;
textRect.left = nameLabelRect.left;
textRect.right = nameLabelRect.left + 1.8*(printerComboRect.left - nameLabelRect.left);
textRect.top = pdfGroupBoxRect.top + nameLabelRect.top - printerGroupRect.top;
textRect.bottom = textRect.top + nameLabelRect.bottom - nameLabelRect.top;
- createStaticText(hdlg, hinstance, stc1, "Page Scaling:", &textRect);
+ createStaticText(hdlg, hinstance, (HMENU)stc1, "Page Scaling:", &textRect);
RECT comboBoxRect;
comboBoxRect.left = textRect.right;
comboBoxRect.right = comboBoxRect.left + printerComboRect.right - printerComboRect.left;;
comboBoxRect.top = pdfGroupBoxRect.top + printerComboRect.top - printerGroupRect.top;
comboBoxRect.bottom = textRect.top + 4*(printerComboRect.bottom - printerComboRect.top);
- HWND comboBoxWind = createPageScaleComboBox(hdlg, hinstance, cmb1, &comboBoxRect);
+ HWND comboBoxWind = createPageScaleComboBox(hdlg, hinstance, (HMENU)cmb1, &comboBoxRect);
RECT checkBox1Rect;
checkBox1Rect.left = radio1Rect.left;
checkBox1Rect.right = pdfGroupBoxRect.right - 10;
checkBox1Rect.top = pdfGroupBoxRect.top + statusLabelRect.top - printerGroupRect.top;
checkBox1Rect.bottom = checkBox1Rect.top + radio1Rect.bottom - radio1Rect.top;
- HWND checkBox1Wind = createCheckBox(hdlg, hinstance, chx3, "Center", &checkBox1Rect);
+ HWND checkBox1Wind = createCheckBox(hdlg, hinstance, (HMENU)chx3, "Center", &checkBox1Rect);
RECT checkBox2Rect;
checkBox2Rect.left = radio1Rect.left;
checkBox2Rect.right = pdfGroupBoxRect.right - 10;
checkBox2Rect.top = checkBox1Rect.top + radio2Rect.top - radio1Rect.top;
checkBox2Rect.bottom = checkBox2Rect.top + radio1Rect.bottom - radio1Rect.top;
- HWND checkBox2Wind = createCheckBox(hdlg, hinstance, chx4, "Select page size using document page size", &checkBox2Rect);
+ HWND checkBox2Wind = createCheckBox(hdlg, hinstance, (HMENU)chx4, "Select page size using document page size", &checkBox2Rect);
// Move OK and Cancel buttons down ensuring they are last in the Z order
// so that the tab order is correct.
More information about the poppler
mailing list