From d6b293001d67e71e751b1d54e4a9dc8529cd29d6 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 10 Aug 2012 22:22:59 +0100 Subject: fix build warnings --- windows/about.c | 5 ++++- windows/bitmap.c | 3 +++ windows/download.c | 7 +++++-- windows/drawable.c | 2 ++ windows/findfile.c | 3 +++ windows/font.c | 4 ++++ windows/gui.c | 2 ++ windows/localhistory.c | 2 ++ windows/main.c | 3 +++ windows/misc.c | 3 +++ windows/plot.c | 20 ++++++++++++++------ windows/prefs.c | 2 ++ windows/thumbnail.c | 2 ++ 13 files changed, 49 insertions(+), 9 deletions(-) (limited to 'windows') diff --git a/windows/about.c b/windows/about.c index 164ee9381..74bca0ed9 100644 --- a/windows/about.c +++ b/windows/about.c @@ -16,9 +16,12 @@ * along with this program. If not, see . */ -#include #include +#include "utils/config.h" + +#include + #include "utils/utils.h" #include "utils/messages.h" #include "desktop/netsurf.h" diff --git a/windows/bitmap.c b/windows/bitmap.c index aaa5633bc..378dc8bb9 100644 --- a/windows/bitmap.c +++ b/windows/bitmap.c @@ -20,6 +20,9 @@ #include #include #include + +#include "utils/config.h" + #include #include "image/bitmap.h" diff --git a/windows/download.c b/windows/download.c index e9ab28b97..635e3b604 100644 --- a/windows/download.c +++ b/windows/download.c @@ -17,10 +17,13 @@ */ #include -#include -#include #include +#include "utils/config.h" + +#include +#include + #include "content/fetch.h" #include "desktop/gui.h" #include "utils/schedule.h" diff --git a/windows/drawable.c b/windows/drawable.c index 883931e32..1688fc8d1 100644 --- a/windows/drawable.c +++ b/windows/drawable.c @@ -18,6 +18,8 @@ #include +#include "utils/config.h" + #include #include diff --git a/windows/findfile.c b/windows/findfile.c index 8a3cb44a6..a91125c59 100644 --- a/windows/findfile.c +++ b/windows/findfile.c @@ -17,7 +17,9 @@ * along with this program. If not, see . */ +#include #include + #include #include #include @@ -25,6 +27,7 @@ #include #include + #include #include "utils/url.h" diff --git a/windows/font.c b/windows/font.c index f97e366f6..9a5d9ebc6 100644 --- a/windows/font.c +++ b/windows/font.c @@ -21,7 +21,11 @@ #include #include + +#include "utils/config.h" + #include + #include "css/css.h" #include "render/font.h" #include "desktop/options.h" diff --git a/windows/gui.c b/windows/gui.c index 21e9d1743..27f55c860 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -23,6 +23,8 @@ #include #include +#include "utils/config.h" + #include #include #include diff --git a/windows/localhistory.c b/windows/localhistory.c index d1d533f4e..aad1aa402 100644 --- a/windows/localhistory.c +++ b/windows/localhistory.c @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#include "utils/config.h" + #include #include #include diff --git a/windows/main.c b/windows/main.c index 8213ca8c7..6d2179a9e 100644 --- a/windows/main.c +++ b/windows/main.c @@ -18,6 +18,9 @@ #include #include + +#include "utils/config.h" + #include #include "desktop/gui.h" diff --git a/windows/misc.c b/windows/misc.c index 513a2bd1d..5132e612b 100644 --- a/windows/misc.c +++ b/windows/misc.c @@ -20,6 +20,9 @@ #include #include #include + +#include "utils/config.h" + #include #include "desktop/cookies.h" diff --git a/windows/plot.c b/windows/plot.c index 2898fae27..b3c3e5892 100644 --- a/windows/plot.c +++ b/windows/plot.c @@ -22,6 +22,9 @@ #include #include #include + +#include "utils/config.h" + #include #include "utils/log.h" @@ -94,12 +97,13 @@ static bool line(int x0, int y0, int x1, int y1, const plot_style_t *style) DeleteObject(clipregion); return false; } +/* RECT r; r.left = x0; r.top = y0; r.right = x1; r.bottom = y1; - +*/ SelectClipRgn(plot_hdc, clipregion); MoveToEx(plot_hdc, x0, y0, (LPPOINT) NULL); @@ -276,15 +280,16 @@ static bool text(int x, int y, const char *text, size_t length, int wlen; SIZE s; LPWSTR wstring; - RECT r; fontbak = (HFONT) SelectObject(plot_hdc, font); GetTextExtentPoint(plot_hdc, text, length, &s); +/* + RECT r; r.left = x; r.top = y - (3 * s.cy) / 4; r.right = x + s.cx; r.bottom = y + s.cy / 4; - +*/ SelectClipRgn(plot_hdc, clipregion); SetTextAlign(plot_hdc, TA_BASELINE | TA_LEFT); @@ -354,12 +359,13 @@ static bool disc(int x, int y, int radius, const plot_style_t *style) DeleteObject(brush); return false; } +/* RECT r; r.left = x - radius; r.top = y - radius; r.right = x + radius; r.bottom = y + radius; - +*/ SelectClipRgn(plot_hdc, clipregion); if (style->fill_type == PLOT_OP_TYPE_NONE) @@ -408,7 +414,7 @@ static bool arc(int x, int y, int radius, int angle1, int angle2, DeleteObject(pen); return false; } - RECT r; + int q1, q2; double a1=1.0, a2=1.0, b1=1.0, b2=1.0; q1 = (int) ((angle1 + 45) / 90) - 45; @@ -462,11 +468,13 @@ static bool arc(int x, int y, int radius, int angle1, int angle2, break; } +/* + RECT r; r.left = x - radius; r.top = y - radius; r.right = x + radius; r.bottom = y + radius; - +*/ SelectClipRgn(plot_hdc, clipregion); Arc(plot_hdc, x - radius, y - radius, x + radius, y + radius, diff --git a/windows/prefs.c b/windows/prefs.c index b3cdca3ae..577c2a509 100644 --- a/windows/prefs.c +++ b/windows/prefs.c @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#include "utils/config.h" + #include #include diff --git a/windows/thumbnail.c b/windows/thumbnail.c index e2d85fc64..4ce0aba1c 100644 --- a/windows/thumbnail.c +++ b/windows/thumbnail.c @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#include "utils/config.h" + #include #include "content/urldb.h" -- cgit v1.2.3