diff --git a/doomsday/config_unix_any.pri b/doomsday/config_unix_any.pri index 4e90f6002b..e416100e1e 100644 --- a/doomsday/config_unix_any.pri +++ b/doomsday/config_unix_any.pri @@ -11,6 +11,10 @@ QMAKE_CFLAGS_WARN_ON -= -Wall QMAKE_CFLAGS_WARN_ON -= -W QMAKE_CFLAGS_WARN_ON += -Werror-implicit-function-declaration -fdiagnostics-show-option +*-clang* { + QMAKE_CFLAGS_WARN_ON += -Wno-tautological-compare +} + # Print include directories and other info. #QMAKE_CFLAGS += -Wp,-v diff --git a/doomsday/engine/portable/src/gl_texmanager.c b/doomsday/engine/portable/src/gl_texmanager.c index 5c0f9d1eb0..523a24e4ed 100644 --- a/doomsday/engine/portable/src/gl_texmanager.c +++ b/doomsday/engine/portable/src/gl_texmanager.c @@ -3107,8 +3107,8 @@ static void performImageAnalyses(Texture* tex, const image_t* image, // Average alpha? if(spec->type == TST_GENERAL && - (TS_GENERAL(spec)->context == TC_SPRITE_DIFFUSE) || - (TS_GENERAL(spec)->context == TC_UI)) + (TS_GENERAL(spec)->context == TC_SPRITE_DIFFUSE || + TS_GENERAL(spec)->context == TC_UI)) { averagealpha_analysis_t* aa = (averagealpha_analysis_t*) Texture_Analysis(tex, TA_ALPHA); boolean firstInit = (!aa); diff --git a/doomsday/engine/portable/src/materialvariant.c b/doomsday/engine/portable/src/materialvariant.c index 0c7c3efea5..b2f3e9620f 100644 --- a/doomsday/engine/portable/src/materialvariant.c +++ b/doomsday/engine/portable/src/materialvariant.c @@ -240,7 +240,7 @@ int MaterialVariant_SnapshotPrepareFrame(const materialvariant_t* mat) void MaterialVariant_SetSnapshotPrepareFrame(materialvariant_t* mat, int frame) { assert(mat); - mat->_snapshotPrepareFrame; + mat->_snapshotPrepareFrame = frame; } materialvariant_t* MaterialVariant_TranslationNext(materialvariant_t* mat) diff --git a/doomsday/engine/portable/src/p_maputil.c b/doomsday/engine/portable/src/p_maputil.c index 71b2cdf028..6337a62486 100644 --- a/doomsday/engine/portable/src/p_maputil.c +++ b/doomsday/engine/portable/src/p_maputil.c @@ -480,7 +480,7 @@ int GameMap_LineMobjsIterator(GameMap* map, LineDef* lineDef, int result = false; assert(map); - root = map->lineLinks[GameMap_LineDefIndex(map, lineDef)], nix; + root = map->lineLinks[GameMap_LineDefIndex(map, lineDef)]; ln = map->lineNodes.nodes; for(nix = ln[root].next; nix != root; nix = ln[nix].next) diff --git a/doomsday/engine/portable/src/point.c b/doomsday/engine/portable/src/point.c index a83ab27e91..7935f170e3 100644 --- a/doomsday/engine/portable/src/point.c +++ b/doomsday/engine/portable/src/point.c @@ -149,7 +149,7 @@ void Point2_Sum(Point2* p, const Point2* other) boolean Point2_Equality(const Point2* p, const Point2* other) { assert(p && other); - return p == other || p->raw.x == Point2_X(other) && p->raw.y == Point2_Y(other); + return p == other || (p->raw.x == Point2_X(other) && p->raw.y == Point2_Y(other)); } Point2f* Point2f_New(void) @@ -265,7 +265,7 @@ void Point2f_Sum(Point2f* p, const Point2f* other) boolean Point2f_Equality(const Point2f* p, const Point2f* other) { assert(p && other); - return p == other || p->raw.x == Point2f_X(other) && p->raw.y == Point2f_Y(other); + return p == other || (p->raw.x == Point2f_X(other) && p->raw.y == Point2f_Y(other)); } struct point3_s { @@ -404,7 +404,9 @@ void Point3_Sum(Point3* p, const Point3* other) boolean Point3_Equality(const Point3* p, const Point3* other) { assert(p && other); - return p == other || p->raw.x == Point3_X(other) && p->raw.y == Point3_Y(other) && p->raw.z == Point3_Z(other); + return p == other || (p->raw.x == Point3_X(other) && + p->raw.y == Point3_Y(other) && + p->raw.z == Point3_Z(other)); } Point3f* Point3f_New(void) @@ -533,5 +535,7 @@ void Point3f_Sum(Point3f* p, const Point3f* other) boolean Point3f_Equality(const Point3f* p, const Point3f* other) { assert(p && other); - return p == other || p->raw.x == Point3f_X(other) && p->raw.y == Point3f_Y(other) && p->raw.z == Point3f_Z(other); + return p == other || (p->raw.x == Point3f_X(other) && + p->raw.y == Point3f_Y(other) && + p->raw.z == Point3f_Z(other)); } diff --git a/doomsday/engine/portable/src/r_lgrid.c b/doomsday/engine/portable/src/r_lgrid.c index 87618f52a2..2f2cb8d387 100644 --- a/doomsday/engine/portable/src/r_lgrid.c +++ b/doomsday/engine/portable/src/r_lgrid.c @@ -599,7 +599,7 @@ static void LG_ApplySector(gridblock_t *block, const float *color, float level, void LG_SectorChanged(Sector* sector) { if(!lgInited) return; - if(!sector || 0 == sector->changedBlockCount && 0 == sector->blockCount) return; + if(!sector || (!sector->changedBlockCount && !sector->blockCount)) return; // Mark changed blocks and contributors. { uint i; diff --git a/doomsday/engine/portable/src/sys_reslocator.c b/doomsday/engine/portable/src/sys_reslocator.c index 2e07d2b9ec..c33fef1c6a 100644 --- a/doomsday/engine/portable/src/sys_reslocator.c +++ b/doomsday/engine/portable/src/sys_reslocator.c @@ -338,7 +338,7 @@ static boolean findResourceInNamespace(resourcenamespaceinfo_t* rnInfo, const dd p.foundNode = NULL; // Perform the search. - if(found = ResourceNamespace_Iterate2(rnInfo->rnamespace, name, findResourceInNamespaceWorker, (void*)&p)) + if((found = ResourceNamespace_Iterate2(rnInfo->rnamespace, name, findResourceInNamespaceWorker, (void*)&p))) { // Does the caller want to know the matched path? if(foundPath)