diff --git a/src/brush_ops.c b/src/brush_ops.c
index eca26dfc..83101190 100644
--- a/src/brush_ops.c
+++ b/src/brush_ops.c
@@ -1020,7 +1020,7 @@ void Rotate_brush_0_5(void)
short computed_y=0;
byte angle_change;
short prev_state;
- float angle=0.0;
+ double angle=0.0;
int dx,dy;
short cursor_x, cursor_y;
diff --git a/src/const.h b/src/const.h
index ad2b224d..1bcfaaea 100644
--- a/src/const.h
+++ b/src/const.h
@@ -107,7 +107,7 @@
#define RIGHT_SIDE 2 ///< Indicates a right side or right-click
#define SEPARATOR_WIDTH 6 ///< Width of the separator between the normal and the zoomed view
-#define INITIAL_SEPARATOR_PROPORTION 0.3 ///< Proportion of the normal view width, relative to the whole screen width.
+#define INITIAL_SEPARATOR_PROPORTION 0.3f ///< Proportion of the normal view width, relative to the whole screen width.
#define NB_ZOOMED_PIXELS_MIN 4 ///< Minimal number of pixel shown (in width) by the zoomed view. (Note: below 4, you can't scroll!)
#if defined(__MORPHOS__) || defined(__amigaos4__) || defined(__amigaos__) || defined(__AROS__)
diff --git a/src/fileformats.c b/src/fileformats.c
index d4175024..8b1da38d 100644
--- a/src/fileformats.c
+++ b/src/fileformats.c
@@ -892,7 +892,7 @@ void Load_IFF(T_IO_Context * context)
short line_size = 0; // Taille d'une ligne en octets
short plane_line_size = 0; // Size of line in bytes for 1 plane
short real_line_size = 0; // Taille d'une ligne en pixels
- long file_size;
+ unsigned long file_size;
dword dummy;
int iff_format = 0;
int plane;
diff --git a/src/graph.c b/src/graph.c
index 0cf33f47..ecfa5a23 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -2002,7 +2002,7 @@ void Draw_curve_general(short x1, short y1,
old_x=x1;
old_y=y1;
Pixel_figure(old_x,old_y,color);
- delta=0.05; // 1.0/20
+ delta=0.05f; // 1.0/20
t=0;
for (i=1; i<=20; i++)
{
diff --git a/src/misc.c b/src/misc.c
index e09fbe27..e451ad51 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -21,6 +21,9 @@
You should have received a copy of the GNU General Public License
along with Grafx2; if not, see
*/
+#if defined(WIN32)
+#define _WIN32_WINNT 0x0500
+#endif
#include
#include
#ifndef _MSC_VER
@@ -709,7 +712,6 @@ void Zoom_a_line(byte* original_line, byte* zoomed_line,
/*############################################################################*/
#if defined(__WIN32__)
-#define _WIN32_WINNT 0x0500
#include
#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__OpenBSD__)
diff --git a/src/windows.c b/src/windows.c
index 416c90eb..e752c372 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -3012,7 +3012,7 @@ byte Best_color_range(byte r, byte g, byte b, byte max)
{
int col;
- float best_diff=255.0*1.56905;
+ float best_diff=255.0f*1.56905f;
byte best_color=0;
float target_bri;
float bri;
@@ -3055,7 +3055,7 @@ byte Best_color_perceptual(byte r,byte g,byte b)
{
int col;
- float best_diff=255.0*1.56905;
+ float best_diff=255.0f*1.56905f;
byte best_color=0;
float target_bri;
float bri;
@@ -3098,7 +3098,7 @@ byte Best_color_perceptual_except(byte r,byte g,byte b, byte except)
{
int col;
- float best_diff=255.0*1.56905;
+ float best_diff=255.0f*1.56905f;
byte best_color=0;
float target_bri;
float bri;