41e47a5
diff -up ClanLib-0.6.5/Sources/Core/IOData/Generic/datafile_inputprovider.cpp~ ClanLib-0.6.5/Sources/Core/IOData/Generic/datafile_inputprovider.cpp
41e47a5
--- ClanLib-0.6.5/Sources/Core/IOData/Generic/datafile_inputprovider.cpp~	2019-11-05 18:58:20.417208298 +0100
41e47a5
+++ ClanLib-0.6.5/Sources/Core/IOData/Generic/datafile_inputprovider.cpp	2019-11-05 18:57:56.616025616 +0100
41e47a5
@@ -304,7 +304,7 @@ int CL_InputSource_Datafile::size() cons
41e47a5
 
41e47a5
 void CL_InputSource_Datafile::push_position()
41e47a5
 {
41e47a5
-	CL_Zipped_Position indexpos;
41e47a5
+	CL_Zipped_Position indexpos = {};
41e47a5
 
41e47a5
 	indexpos.gzfile = gzfile;
41e47a5
 //	indexpos.datafile_pos = lseek(datafile_handle, 0, SEEK_CUR);
41e47a5
diff -up ClanLib-0.6.5/Sources/Core/IOData/Generic/inputsource_memory_generic.cpp~ ClanLib-0.6.5/Sources/Core/IOData/Generic/inputsource_memory_generic.cpp
41e47a5
--- ClanLib-0.6.5/Sources/Core/IOData/Generic/inputsource_memory_generic.cpp~	2001-12-11 21:44:21.000000000 +0100
41e47a5
+++ ClanLib-0.6.5/Sources/Core/IOData/Generic/inputsource_memory_generic.cpp	2019-11-05 18:56:35.535403281 +0100
41e47a5
@@ -113,7 +113,7 @@ void CL_InputSource_MemoryGeneric::pop_p
41e47a5
 
41e47a5
 void CL_InputSource_MemoryGeneric::purge()
41e47a5
 {
41e47a5
-	memcpy(data, 0, length);
41e47a5
+	memset(data, 0, length);
41e47a5
 }
41e47a5
 
41e47a5
 CL_InputSourceProvider_Memory::CL_InputSourceProvider_Memory(unsigned char *_data, unsigned int _size, bool _delete_data)
41e47a5
diff -up ClanLib-0.6.5/Sources/Core/IOData/Generic/outputsource_memory_generic.cpp~ ClanLib-0.6.5/Sources/Core/IOData/Generic/outputsource_memory_generic.cpp
41e47a5
--- ClanLib-0.6.5/Sources/Core/IOData/Generic/outputsource_memory_generic.cpp~	2001-04-29 19:04:28.000000000 +0200
41e47a5
+++ ClanLib-0.6.5/Sources/Core/IOData/Generic/outputsource_memory_generic.cpp	2019-11-05 18:58:49.664432780 +0100
41e47a5
@@ -82,5 +82,5 @@ int CL_OutputSource_MemoryGeneric::size(
41e47a5
 
41e47a5
 void CL_OutputSource_MemoryGeneric::purge()
41e47a5
 {
41e47a5
-	memcpy(m_data,0,m_size);
41e47a5
+	memset(m_data,0,m_size);
41e47a5
 }
41e47a5
diff -up ClanLib-0.6.5/Sources/Core/Math/vector2.cpp~ ClanLib-0.6.5/Sources/Core/Math/vector2.cpp
41e47a5
--- ClanLib-0.6.5/Sources/Core/Math/vector2.cpp~	2001-09-15 16:54:51.000000000 +0200
41e47a5
+++ ClanLib-0.6.5/Sources/Core/Math/vector2.cpp	2019-11-05 19:06:40.781048814 +0100
41e47a5
@@ -66,9 +66,16 @@ bool CL_Vector2::operator!=(const CL_Vec
41e47a5
         return fabs(x-rkVector.x) > FUZZ || fabs(y-rkVector.y) > FUZZ;
41e47a5
 }
41e47a5
 
41e47a5
+union float_uint {
41e47a5
+    float f;
41e47a5
+    unsigned int u;
41e47a5
+};
41e47a5
+
41e47a5
 bool CL_Vector2::operator<(const CL_Vector2& rkVector) const
41e47a5
 {
41e47a5
     float fXTmp = rkVector.x, fYTmp = rkVector.y;
41e47a5
+    union float_uint uiTest0, uiTest1;
41e47a5
+
41e47a5
     if ( FUZZ > 0.0f )
41e47a5
     {
41e47a5
         if ( fabs(x - fXTmp) <= FUZZ )
41e47a5
@@ -78,22 +85,24 @@ bool CL_Vector2::operator<(const CL_Vect
41e47a5
     }
41e47a5
 
41e47a5
     // compare y values
41e47a5
-    unsigned int uiTest0 = *(unsigned int*)&y;
41e47a5
-    unsigned int uiTest1 = *(unsigned int*)&fYTmp;
41e47a5
-    if ( uiTest0 < uiTest1 )
41e47a5
+    uiTest0.f = y;
41e47a5
+    uiTest1.f = fYTmp;
41e47a5
+    if ( uiTest0.u < uiTest1.u )
41e47a5
         return true;
41e47a5
-    if ( uiTest0 > uiTest1 )
41e47a5
+    if ( uiTest0.u > uiTest1.u )
41e47a5
         return false;
41e47a5
 
41e47a5
     // compare x values
41e47a5
-    uiTest0 = *(unsigned int*)&x;
41e47a5
-    uiTest1 = *(unsigned int*)&fXTmp;
41e47a5
-    return uiTest0 < uiTest1;
41e47a5
+    uiTest0.f = x;
41e47a5
+    uiTest1.f = fXTmp;
41e47a5
+    return uiTest0.u < uiTest1.u;
41e47a5
 }
41e47a5
 
41e47a5
 bool CL_Vector2::operator<=(const CL_Vector2& rkVector) const
41e47a5
 {
41e47a5
     float fXTmp = rkVector.x, fYTmp = rkVector.y;
41e47a5
+    union float_uint uiTest0, uiTest1;
41e47a5
+
41e47a5
     if ( FUZZ > 0.0f )
41e47a5
     {
41e47a5
         if ( fabs(x - fXTmp) <= FUZZ )
41e47a5
@@ -103,22 +112,24 @@ bool CL_Vector2::operator<=(const CL_Vec
41e47a5
     }
41e47a5
 
41e47a5
     // compare y values
41e47a5
-    unsigned int uiTest0 = *(unsigned int*)&y;
41e47a5
-    unsigned int uiTest1 = *(unsigned int*)&fYTmp;
41e47a5
-    if ( uiTest0 < uiTest1 )
41e47a5
+    uiTest0.f = y;
41e47a5
+    uiTest1.f = fYTmp;
41e47a5
+    if ( uiTest0.u < uiTest1.u )
41e47a5
         return true;
41e47a5
-    if ( uiTest0 > uiTest1 )
41e47a5
+    if ( uiTest0.u > uiTest1.u )
41e47a5
         return false;
41e47a5
 
41e47a5
     // compare x values
41e47a5
-    uiTest0 = *(unsigned int*)&x;
41e47a5
-    uiTest1 = *(unsigned int*)&fXTmp;
41e47a5
-    return uiTest0 <= uiTest1;
41e47a5
+    uiTest0.f = x;
41e47a5
+    uiTest1.f = fXTmp;
41e47a5
+    return uiTest0.u <= uiTest1.u;
41e47a5
 }
41e47a5
 
41e47a5
 bool CL_Vector2::operator>(const CL_Vector2& rkVector) const
41e47a5
 {
41e47a5
     float fXTmp = rkVector.x, fYTmp = rkVector.y;
41e47a5
+    union float_uint uiTest0, uiTest1;
41e47a5
+
41e47a5
     if ( FUZZ > 0.0f )
41e47a5
     {
41e47a5
         if ( fabs(x - fXTmp) <= FUZZ )
41e47a5
@@ -128,22 +139,24 @@ bool CL_Vector2::operator>(const CL_Vect
41e47a5
     }
41e47a5
 
41e47a5
     // compare y values
41e47a5
-    unsigned int uiTest0 = *(unsigned int*)&y;
41e47a5
-    unsigned int uiTest1 = *(unsigned int*)&fYTmp;
41e47a5
-    if ( uiTest0 > uiTest1 )
41e47a5
+    uiTest0.f = y;
41e47a5
+    uiTest1.f = fYTmp;
41e47a5
+    if ( uiTest0.u > uiTest1.u )
41e47a5
         return true;
41e47a5
-    if ( uiTest0 < uiTest1 )
41e47a5
+    if ( uiTest0.u < uiTest1.u )
41e47a5
         return false;
41e47a5
 
41e47a5
     // compare x values
41e47a5
-    uiTest0 = *(unsigned int*)&x;
41e47a5
-    uiTest1 = *(unsigned int*)&fXTmp;
41e47a5
-    return uiTest0 > uiTest1;
41e47a5
+    uiTest0.f = x;
41e47a5
+    uiTest1.f = fXTmp;
41e47a5
+    return uiTest0.u > uiTest1.u;
41e47a5
 }
41e47a5
 
41e47a5
 bool CL_Vector2::operator>=(const CL_Vector2& rkVector) const
41e47a5
 {
41e47a5
     float fXTmp = rkVector.x, fYTmp = rkVector.y;
41e47a5
+    union float_uint uiTest0, uiTest1;
41e47a5
+
41e47a5
     if ( FUZZ > 0.0f )
41e47a5
     {
41e47a5
         if ( fabs(x - fXTmp) <= FUZZ )
41e47a5
@@ -153,17 +166,17 @@ bool CL_Vector2::operator>=(const CL_Vec
41e47a5
     }
41e47a5
 
41e47a5
     // compare y values
41e47a5
-    unsigned int uiTest0 = *(unsigned int*)&y;
41e47a5
-    unsigned int uiTest1 = *(unsigned int*)&fYTmp;
41e47a5
-    if ( uiTest0 > uiTest1 )
41e47a5
+    uiTest0.f = y;
41e47a5
+    uiTest1.f = fYTmp;
41e47a5
+    if ( uiTest0.u > uiTest1.u )
41e47a5
         return true;
41e47a5
-    if ( uiTest0 < uiTest1 )
41e47a5
+    if ( uiTest0.u < uiTest1.u )
41e47a5
         return false;
41e47a5
 
41e47a5
     // compare x values
41e47a5
-    uiTest0 = *(unsigned int*)&x;
41e47a5
-    uiTest1 = *(unsigned int*)&fXTmp;
41e47a5
-    return uiTest0 >= uiTest1;
41e47a5
+    uiTest0.f = x;
41e47a5
+    uiTest1.f = fXTmp;
41e47a5
+    return uiTest0.u >= uiTest1.u;
41e47a5
 }
41e47a5
 
41e47a5
 CL_Vector2 CL_Vector2::operator+(const CL_Vector2& rkVector) const
41e47a5
diff -up ClanLib-0.6.5/Sources/Display/Display/Generic/colormap.h~ ClanLib-0.6.5/Sources/Display/Display/Generic/colormap.h
41e47a5
--- ClanLib-0.6.5/Sources/Display/Display/Generic/colormap.h~	2001-09-08 21:12:48.000000000 +0200
41e47a5
+++ ClanLib-0.6.5/Sources/Display/Display/Generic/colormap.h	2019-11-05 19:09:31.942362545 +0100
41e47a5
@@ -41,10 +41,14 @@ public:
41e47a5
 	unsigned int calc_color(float r, float g, float b, float a)
41e47a5
 	{
41e47a5
 		// paranoia:
41e47a5
-		if (r>1) r=1; if (g>1) g=1;
41e47a5
-		if (b>1) b=1; if (a>1) a=1;
41e47a5
-		if (r<0) r=0; if (g<0) g=0;
41e47a5
-		if (b<0) b=0; if (a<0) a=0;
41e47a5
+		if (r>1) r=1;
41e47a5
+		if (g>1) g=1;
41e47a5
+		if (b>1) b=1;
41e47a5
+		if (a>1) a=1;
41e47a5
+		if (r<0) r=0;
41e47a5
+		if (g<0) g=0;
41e47a5
+		if (b<0) b=0;
41e47a5
+		if (a<0) a=0;
41e47a5
 
41e47a5
 		unsigned int red = (unsigned int) (r*((1<
41e47a5
 		unsigned int green = (unsigned int) (g*((1<
41e47a5
diff -up ClanLib-0.6.5/Sources/Display/Display/Generic/surfaceprovider.cpp~ ClanLib-0.6.5/Sources/Display/Display/Generic/surfaceprovider.cpp
41e47a5
--- ClanLib-0.6.5/Sources/Display/Display/Generic/surfaceprovider.cpp~	2002-06-26 13:54:19.000000000 +0200
41e47a5
+++ ClanLib-0.6.5/Sources/Display/Display/Generic/surfaceprovider.cpp	2019-11-05 19:10:50.438965045 +0100
41e47a5
@@ -84,7 +84,7 @@ void CL_SurfaceProvider::get_pixel(int x
41e47a5
 
41e47a5
 		lock();
41e47a5
 		unsigned char* data = (unsigned char*) get_data();
41e47a5
-		int color = 0;
41e47a5
+		unsigned int color = 0;
41e47a5
 	
41e47a5
 		switch (get_bytes_per_pixel())
41e47a5
 		{
41e47a5
diff -up ClanLib-0.6.5/Sources/Display/SurfaceProviders/provider_targa.cpp~ ClanLib-0.6.5/Sources/Display/SurfaceProviders/provider_targa.cpp
41e47a5
--- ClanLib-0.6.5/Sources/Display/SurfaceProviders/provider_targa.cpp~	2019-11-05 18:03:29.000000000 +0100
41e47a5
+++ ClanLib-0.6.5/Sources/Display/SurfaceProviders/provider_targa.cpp	2019-11-05 19:10:10.647659631 +0100
41e47a5
@@ -781,7 +781,7 @@ void CL_TargaProvider::read_runlength_en
41e47a5
 		// RUNLENGTH ENCODED PACKET
41e47a5
 		case 1:
41e47a5
 			{
41e47a5
-				unsigned char r, g, b, a;
41e47a5
+				unsigned char r = 0, g = 0, b = 0, a = 0;
41e47a5
 				bool v = read_rgb(&r, &g, &b, &a);
41e47a5
 				
41e47a5
 				for (;repcount>0;repcount--)
41e47a5
diff -up ClanLib-0.6.5/Sources/GUI/popupmenu_default.cpp~ ClanLib-0.6.5/Sources/GUI/popupmenu_default.cpp
41e47a5
--- ClanLib-0.6.5/Sources/GUI/popupmenu_default.cpp~	2002-03-01 23:19:09.000000000 +0100
41e47a5
+++ ClanLib-0.6.5/Sources/GUI/popupmenu_default.cpp	2019-11-05 19:22:27.540262347 +0100
41e47a5
@@ -34,8 +34,6 @@ CL_PopupMenu_Default::CL_PopupMenu_Defau
41e47a5
 
41e47a5
 void CL_PopupMenu_Default::on_paint()
41e47a5
 {
41e47a5
-	bool focus = popupmenu->has_child(popupmenu->get_focus());
41e47a5
-
41e47a5
 	int width = popupmenu->get_width();
41e47a5
 	int height = popupmenu->get_height();
41e47a5
 		
41e47a5
@@ -49,7 +47,6 @@ void CL_PopupMenu_Default::on_paint_node
41e47a5
 	CL_Component *component = node->get_component();
41e47a5
 	
41e47a5
 	int height = component->get_height();
41e47a5
-	int mid = (height) / 2;
41e47a5
 
41e47a5
 	// Draw arrow showing this item has a submenu
41e47a5
 	if(node->has_children())
41e47a5
diff -up ClanLib-0.6.5/Sources/SmallJPEG/jpgd/idct.cpp~ ClanLib-0.6.5/Sources/SmallJPEG/jpgd/idct.cpp
41e47a5
--- ClanLib-0.6.5/Sources/SmallJPEG/jpgd/idct.cpp~	2001-04-20 14:54:18.000000000 +0200
41e47a5
+++ ClanLib-0.6.5/Sources/SmallJPEG/jpgd/idct.cpp	2019-11-05 19:22:38.574346144 +0100
41e47a5
@@ -58,7 +58,7 @@
41e47a5
 #define FIX_2_562915447  ((int32)  20995)       /* FIX(2.562915447) */
41e47a5
 #define FIX_3_072711026  ((int32)  25172)       /* FIX(3.072711026) */
41e47a5
 /*----------------------------------------------------------------------------*/
41e47a5
-#define DESCALE(x,n)  (((x) + (SCALEDONE << ((n)-1))) >> n)
41e47a5
+#define DESCALE(x,n)  (((x) + (SCALEDONE << ((n)-1))) >> (n))
41e47a5
 /*----------------------------------------------------------------------------*/
41e47a5
 #define MULTIPLY(var,cnst)  ((var) * (cnst))
41e47a5
 /*----------------------------------------------------------------------------*/
41e47a5
diff -up ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/cdaudio_linux.cpp~ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/cdaudio_linux.cpp
41e47a5
--- ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/cdaudio_linux.cpp~	2002-06-22 14:58:11.000000000 +0200
41e47a5
+++ ClanLib-0.6.5/Sources/Sound/Sound/ClanSound/cdaudio_linux.cpp	2019-11-05 19:17:01.993790133 +0100
41e47a5
@@ -208,7 +208,6 @@ CL_CDDrive_Linux::CL_CDDrive_Linux(const
41e47a5
 	}
41e47a5
 	
41e47a5
 	file_handle = open(filename.c_str(),O_RDONLY);//|O_NONBLOCK);
41e47a5
-	int error = errno;
41e47a5
 	if (file_handle <= 0)
41e47a5
 	{
41e47a5
 //		cout << "File handle: " << file_handle << endl;
41e47a5
@@ -235,7 +234,6 @@ CL_CDDrive_Linux::CL_CDDrive_Linux(const
41e47a5
 	}
41e47a5
 	else
41e47a5
 	{
41e47a5
-		error = errno;
41e47a5
 //		cout << "Error Number: " << error << endl;
41e47a5
 		close(file_handle);
41e47a5
 	
41e47a5
@@ -377,10 +375,12 @@ int CL_CDDrive_Linux::get_cur_frame()
41e47a5
 
41e47a5
 bool CL_CDDrive_Linux::play_tracks(int track, int end_track)
41e47a5
 {
41e47a5
-    if((track < first_track) || (track > last_track))
41e47a5
+    if ((track < first_track) || (track > last_track))
41e47a5
         return false;
41e47a5
-	if((end_track < track) || (end_track > last_track))
41e47a5
-	    return false;
41e47a5
+
41e47a5
+    if ((end_track < track) || (end_track > last_track))
41e47a5
+        return false;
41e47a5
+
41e47a5
 	  #ifdef __FreeBSD__
41e47a5
 		ioc_play_msf msf;
41e47a5
 	#else  
41e47a5
@@ -574,13 +574,12 @@ bool CL_CDDrive_Linux::readtoc()
41e47a5
 
41e47a5
 			cur_track_info.entry.addr.lba = next_track_info.entry.addr.lba;
41e47a5
 #else
41e47a5
-	    if(cur_track_info.cdte_ctrl == CDROM_DATA_TRACK)
41e47a5
+	if(cur_track_info.cdte_ctrl == CDROM_DATA_TRACK)
41e47a5
 	        track.is_audio = false;
41e47a5
-			
41e47a5
-		
41e47a5
-		tracks.push_back(track);
41e47a5
-		cur_track_info.cdte_addr.lba = next_track_info.cdte_addr.lba;
41e47a5
-		cur_track_info.cdte_ctrl     = next_track_info.cdte_ctrl;
41e47a5
+
41e47a5
+	tracks.push_back(track);
41e47a5
+	cur_track_info.cdte_addr.lba = next_track_info.cdte_addr.lba;
41e47a5
+	cur_track_info.cdte_ctrl     = next_track_info.cdte_ctrl;
41e47a5
 #endif
41e47a5
     }
41e47a5
     return true;
41e47a5
diff -up ClanLib-0.6.5/Sources/TTF/font_ttf.cpp~ ClanLib-0.6.5/Sources/TTF/font_ttf.cpp
41e47a5
--- ClanLib-0.6.5/Sources/TTF/font_ttf.cpp~	2019-11-05 18:03:29.000000000 +0100
41e47a5
+++ ClanLib-0.6.5/Sources/TTF/font_ttf.cpp	2019-11-05 19:23:45.533854635 +0100
41e47a5
@@ -133,7 +133,7 @@ void CL_Font_TTF::generate_font()
41e47a5
 		unsigned char *buffer =(unsigned char*) canvas->get_data();
41e47a5
 		unsigned char *bmp = (unsigned char*)face->glyph->bitmap.buffer;
41e47a5
 
41e47a5
-		for(int j=0;j<(face->glyph->bitmap.rows*face->glyph->bitmap.width);j++)
41e47a5
+		for(unsigned int j=0;j<(face->glyph->bitmap.rows*face->glyph->bitmap.width);j++)
41e47a5
 		{
41e47a5
 			*buffer = (*bmp) & a;
41e47a5
 			*(buffer+1) = (*bmp) & b;