Index: /cpp/common/stl-util.cpp
===================================================================
--- /cpp/common/stl-util.cpp	(revision 318)
+++ /cpp/common/stl-util.cpp	(revision 319)
@@ -21,5 +21,5 @@
 {
 	string s; //clang crashed when this declaration was in s=buf
-	long size = 256;
+	int size = 256;
 	char* buf;
 	va_list ap_copy; // "va_list ap" can only by used once by printf-type functions as they advance the current argument pointer (crashed on linux x86_64)
@@ -151,7 +151,7 @@
 string stripExt(const string& filename)
 {
-	int dot = filename.rfind('.');
+	size_t dot = filename.rfind('.');
 	if (dot == string::npos) return filename;
-	int sep = filename.rfind(PATH_SEPARATOR_CHAR);
+	size_t sep = filename.rfind(PATH_SEPARATOR_CHAR);
 	if ((sep == string::npos) || (sep < dot))
 		return filename.substr(0, dot);
@@ -161,7 +161,7 @@
 string getFileExt(const string& filename)
 {
-	int dot = filename.rfind('.');
+	size_t dot = filename.rfind('.');
 	if (dot == string::npos) return string("");
-	int sep = filename.rfind(PATH_SEPARATOR_CHAR);
+	size_t sep = filename.rfind(PATH_SEPARATOR_CHAR);
 	if ((sep == string::npos) || (sep < dot))
 		return filename.substr(dot);
@@ -171,5 +171,5 @@
 string getFileDir(const string& filename)
 {
-	int slash = filename.rfind(PATH_SEPARATOR_CHAR);
+	size_t slash = filename.rfind(PATH_SEPARATOR_CHAR);
 	if (slash == string::npos) return string("");
 	return filename.substr(0, slash);
Index: /cpp/frams/_demos/genooper_test_fTest.cpp
===================================================================
--- /cpp/frams/_demos/genooper_test_fTest.cpp	(revision 318)
+++ /cpp/frams/_demos/genooper_test_fTest.cpp	(revision 319)
@@ -15,5 +15,5 @@
 	{
 		int _method; //unused
-		int result = gft.mutate(g, chg, _method);
+		/*int result = */gft.mutate(g, chg, _method);
 		printf("%s   [mutated %.1f%%]\n", g, chg * 100);
 	}
Index: /cpp/frams/_demos/part_shapes.cpp
===================================================================
--- /cpp/frams/_demos/part_shapes.cpp	(revision 318)
+++ /cpp/frams/_demos/part_shapes.cpp	(revision 319)
@@ -11,5 +11,4 @@
 	Model m;
 	Part *p1, *p2;
-	Joint *j;
 
 	m.open();
Index: /cpp/frams/_demos/serial_test.cpp
===================================================================
--- /cpp/frams/_demos/serial_test.cpp	(revision 318)
+++ /cpp/frams/_demos/serial_test.cpp	(revision 319)
@@ -32,4 +32,5 @@
 	{
 	case TUnknown: puts("null"); return;
+	case TInvalid: puts("invalid"); return;
 	case TInt: printf("int:"); break;
 	case TDouble: printf("double:"); break;
Index: /cpp/frams/canvas/nn_smart_layout.cpp
===================================================================
--- /cpp/frams/canvas/nn_smart_layout.cpp	(revision 318)
+++ /cpp/frams/canvas/nn_smart_layout.cpp	(revision 319)
@@ -13,5 +13,6 @@
 #endif
 
-#define DB(x) 
+//#define DB(x) x
+#define DB(x)
 
 #if DB(1)+0
@@ -105,12 +106,11 @@
 		h = maxy - miny + 1;
 		map = (char*)calloc(1, w*h);
-		int i, e;
-		DB(printf("mapa bloku #%ld\n", id));
-		for (i = 0; i < elementy.size(); i++)
-		{
-			e = elementy[i];
+		DB(printf("mapa bloku #%d\n", id));
+		for (size_t i = 0; i < elementy.size(); i++)
+		{
+			int e = elementy[i];
 			map[w*(einfo[e].y - miny) + (einfo[e].x - minx)] = 1;
 		}
-		DB(for (i = 0; i < h; i++){ for (e = 0; e < w; e++)printf("%c", map[w*i + e] ? '*' : '.'); printf("\n"); })
+		DB(for (int i = 0; i < h; i++){ for (int e = 0; e < w; e++)printf("%c", map[w*i + e] ? '*' : '.'); printf("\n"); })
 	}
 
@@ -154,11 +154,10 @@
 { // return 1 if successful
 	if (!moznadolaczyc(b, b2, dx, dy)) return 0; // merging causes no collision
-	DB(printf("#%ld(%ld,%ld,%ld,%ld) + #%ld(%ld,%ld,%ld,%ld)<%ld,%ld>", b->id, b->minx, b->miny, b->maxx, b->maxy, b2->id, b2->minx, b2->miny, b2->maxx, b2->maxy, dx, dy));
+	DB(printf("#%d(%d,%d,%d,%d) + #%d(%d,%d,%d,%d)<%d,%d>", b->id, b->minx, b->miny, b->maxx, b->maxy, b2->id, b2->minx, b2->miny, b2->maxx, b2->maxy, dx, dy));
 
 	b->zwolnijmape();
-	int i, e;
-	for (i = 0; i < b2->elementy.size(); i++)
-	{
-		e = b2->elementy[i];
+	for (size_t i = 0; i < b2->elementy.size(); i++)
+	{
+		int e = b2->elementy[i];
 		b->dodajelement(e, einfo[e].x + dx, einfo[e].y + dy);
 	}
@@ -168,18 +167,20 @@
 	b->maxy = max(b->maxy, dy + b2->maxy);
 
-	DB(printf(" -> (%ld,%ld,%ld,%ld)\n", b->minx, b->miny, b->maxx, b->maxy));
-
-	DB(printf(" ...#%ld...(%ld)...", b->id, b->elementy.size()));
-	for (i = 0; i < b->elementy.size(); i++)
-	{
-		e = b->elementy[i];
-		DB(assert(einfo[e].x >= b->minx);)
-			DB(assert(einfo[e].x <= b->maxx);)
-			DB(assert(einfo[e].y >= b->miny);)
-			DB(assert(einfo[e].y <= b->maxy);)
-			DB(printf("(%ld)%ld,%ld ", e, einfo[e].x, einfo[e].y));
-	}
-
-	DB(printf("\n"));
+	DB(
+	printf(" -> (%d,%d,%d,%d)\n", b->minx, b->miny, b->maxx, b->maxy);
+
+	printf(" ...#%d...(%d)...", b->id, b->elementy.size());
+	for (size_t i = 0; i < b->elementy.size(); i++)
+	{
+		int e = b->elementy[i];
+		assert(einfo[e].x >= b->minx);
+			assert(einfo[e].x <= b->maxx);
+			assert(einfo[e].y >= b->miny);
+			assert(einfo[e].y <= b->maxy);
+			printf("(%d)%d,%d ", e, einfo[e].x, einfo[e].y);
+	}
+
+	printf("\n")
+	);
 
 	delete b2;
@@ -205,5 +206,5 @@
 	dx = einfo[e].x - einfo[e2].x;
 	dy = einfo[e].y - einfo[e2].y;
-	DB(printf("  elem.%ld (%ld,%ld@%ld) + elem.%ld (%ld,%ld@%ld)...\n", e, einfo[e].x, einfo[e].y, b->id, e2, einfo[e2].x, einfo[e2].y, b2->id));
+	DB(printf("  elem.%d (%d,%d@%d) + elem.%d (%d,%d@%d)...\n", e, einfo[e].x, einfo[e].y, b->id, e2, einfo[e2].x, einfo[e2].y, b2->id));
 	if (dolaczblock(b, b2, dx - 1, dy)) return;
 	int proba; // retry - increasing the y offset (keeps x offset at -1)
@@ -222,5 +223,5 @@
 	if (einfo[e].block)
 	{
-		DB(printf("block#%ld exists\n", e));
+		DB(printf("block#%d exists\n", e));
 		return;
 	}
@@ -312,7 +313,6 @@
 	{
 		DB(printf(" - - setting coordinates - -\n"));
-		int i;
 		DB(first->odtworzmape());
-		for (i = 0; i < first->elementy.size(); i++)
+		for (size_t i = 0; i < first->elementy.size(); i++)
 		{
 			el = first->elementy[i];
Index: /cpp/frams/genetics/f1/conv_f1.cpp
===================================================================
--- /cpp/frams/genetics/f1/conv_f1.cpp	(revision 318)
+++ /cpp/frams/genetics/f1/conv_f1.cpp	(revision 319)
@@ -18,5 +18,5 @@
 {
 public:
-Builder(const char*g,int mapping=0):invalid(0),genbegin(g),usemapping(mapping),energ(0),energ_div(0),first_part_mapping(NULL) {}
+Builder(const char*g,int mapping=0):invalid(0),genbegin(g),usemapping(mapping),first_part_mapping(NULL),energ(0),energ_div(0) {}
 ~Builder() {SAFEDELETE(first_part_mapping);}
 char tmp[222];
Index: /cpp/frams/genetics/f9/conv_f9.cpp
===================================================================
--- /cpp/frams/genetics/f9/conv_f9.cpp	(revision 318)
+++ /cpp/frams/genetics/f9/conv_f9.cpp	(revision 319)
@@ -91,5 +91,5 @@
 int GenoConv_f90::findVertexAt(vector<XYZ_LOC> &vertices, const XYZ_LOC &vertex)
 {
-	for (int i = 0; i < vertices.size(); i++)
+	for (size_t i = 0; i < vertices.size(); i++)
 		if (vertices[i].same_coordinates(vertex)) return i;
 	return -1;
Index: /cpp/frams/genetics/f9/oper_f9.cpp
===================================================================
--- /cpp/frams/genetics/f9/oper_f9.cpp	(revision 318)
+++ /cpp/frams/genetics/f9/oper_f9.cpp	(revision 319)
@@ -30,5 +30,5 @@
 	if (!gene[0]) return 1; //empty is not valid
 	bool ok = true;
-	int i;
+	size_t i;
 	for (i = 0; i < strlen(gene); i++) if (!strchr(turtle_commands_f9, gene[i])) { ok = false; break; }
 	return ok ? GENOPER_OK : i + 1;
@@ -39,5 +39,5 @@
 {
 	SString validated; //new genotype (everything except turtle_commands_f9 is skipped)
-	for (int i = 0; i < strlen(gene); i++)
+	for (size_t i = 0; i < strlen(gene); i++)
 		if (strchr(turtle_commands_f9, gene[i])) validated += gene[i];  //validated contains only turtle_commands_f9
 	free(gene);
Index: /cpp/frams/genetics/fF/conv_fF.cpp
===================================================================
--- /cpp/frams/genetics/fF/conv_fF.cpp	(revision 318)
+++ /cpp/frams/genetics/fF/conv_fF.cpp	(revision 319)
@@ -104,10 +104,10 @@
 		double pcx = chambers[which - 1]->centerX;
 		double pcy = chambers[which - 1]->centerY;
-		double pcz = chambers[which - 1]->centerZ;
+		//double pcz = chambers[which - 1]->centerZ; //not used
 
 		/* aperture of the next to last chamber */
 		double ppx;
 		double ppy;
-		double ppz;
+		//double ppz; //not used
 
 		if (which == 1)
@@ -115,5 +115,5 @@
 			ppx = pcx;
 			ppy = pcy;
-			ppz = pcz;
+			//ppz = pcz;
 		}
 		else
@@ -121,5 +121,5 @@
 			ppx = chambers[which - 2]->holeX;
 			ppy = chambers[which - 2]->holeY;
-			ppz = chambers[which - 2]->holeZ;
+			//ppz = chambers[which - 2]->holeZ;
 		}
 
Index: /cpp/frams/genetics/fT/oper_fTest.cpp
===================================================================
--- /cpp/frams/genetics/fT/oper_fTest.cpp	(revision 318)
+++ /cpp/frams/genetics/fT/oper_fTest.cpp	(revision 319)
@@ -65,5 +65,5 @@
 	if (!gene[0]) return 1; //empty is not valid
 	bool ok = true;
-	int i;
+	size_t i;
 	for (i = 0; i < strlen(gene); i++) if (!strchr("ATGC", gene[i])) { ok = false; break; }
 	return ok ? GENOPER_OK : i + 1;
@@ -74,5 +74,5 @@
 {
 	SString validated; //new genotype (everything except ATGC is skipped)
-	for (int i = 0; i < strlen(gene); i++)
+	for (size_t i = 0; i < strlen(gene); i++)
 		if (strchr("ATGC", gene[i])) validated += gene[i];  //validated contains only ATGC
 	free(gene);
Index: /cpp/frams/genetics/genman.cpp
===================================================================
--- /cpp/frams/genetics/genman.cpp	(revision 318)
+++ /cpp/frams/genetics/genman.cpp	(revision 319)
@@ -101,6 +101,6 @@
 GenMan::GenMan() : localpar(GMparam_tab, this), localstats(GMstats_tab, this),
 seloperpar("GenOperators", "Genetics: Active operators"),
-par("GenMan", "Manages various genetic operations, using appropriate operators for the argument genotype format."),
-neuronsparam("Genetics: Neurons to add", "neuronsAdd", "neuadd_")
+neuronsparam("Genetics: Neurons to add", "neuronsAdd", "neuadd_"),
+par("GenMan", "Manages various genetic operations, using appropriate operators for the argument genotype format.")
 {
 	history = 0;
Index: /cpp/frams/model/model.cpp
===================================================================
--- /cpp/frams/model/model.cpp	(revision 318)
+++ /cpp/frams/model/model.cpp	(revision 319)
@@ -1325,5 +1325,5 @@
 				if ((oj2->part1==op)||(oj2->part2==op))
 					{
-					Joint *newj=addNewJoint(getPart(j),getPart(j2),Joint::SHAPE_SOLID);
+					addNewJoint(getPart(j),getPart(j2),Joint::SHAPE_SOLID);
 					}
 				}
Index: /cpp/frams/param/param.h
===================================================================
--- /cpp/frams/param/param.h	(revision 318)
+++ /cpp/frams/param/param.h	(revision 319)
@@ -60,4 +60,6 @@
 {
 public:
+	virtual ~ParamInterface() {}
+
 	virtual int getGroupCount() = 0; ///< @return the number of property groups
 	virtual int getPropCount() = 0; ///< @return the number of properties
Index: /cpp/frams/util/sstringutils.cpp
===================================================================
--- /cpp/frams/util/sstringutils.cpp	(revision 318)
+++ /cpp/frams/util/sstringutils.cpp	(revision 319)
@@ -298,5 +298,4 @@
 		SString before = pattern.substr(0, aster);
 		SString after = pattern.substr(aster + 1);
-		int pos = 0;
 		if (!word.len()) return false;
 		if (before.len()) if (!word.startsWith(before)) return false;
