Skip to content

Issues following update to Cppcheck 2.13 #7244

Open

Description

@geographika

As part of #7242 Cppcheck was updated from 2.13.0 (from 1.9.0). This raised the issues below that need to be addressed. The checks are currently set to pass in the CI until they can be fixed in 00ef1a5

/home/runner/work/mapserver/mapserver/src/maplabel.c:1185,warning,uninitvar,Uninitialized variables: pnts1.x, pnts1.y, pnts1.z, pnts1.m
/home/runner/work/mapserver/mapserver/src/maplabel.c:1195,warning,uninitvar,Uninitialized variables: pnts2.x, pnts2.y, pnts2.z, pnts2.m
/home/runner/work/mapserver/mapserver/src/maputil.c:1998,warning,uninitvar,Uninitialized variables: old_diffdir.z, old_diffdir.m
/home/runner/work/mapserver/mapserver/src/maputil.c:1999,warning,uninitvar,Uninitialized variables: old_offdir.z, old_offdir.m
uninitvar check failed
/home/runner/work/mapserver/mapserver/src/mappostgis.cpp:2654,performance,passedByValueCallback,Function parameter 'rect' should be passed by const reference. However it seems that 'msPostGISLayerWhichShapes' is a callback function.
/home/runner/work/mapserver/mapserver/src/mappostgis.cpp:2783,performance,passedByValueCallback,Function parameter 'rect' should be passed by const reference. However it seems that 'msPostGISLayerGetShapeCount' is a callback function.
/home/runner/work/mapserver/mapserver/src/mapunion.cpp:365,performance,passedByValueCallback,Function parameter 'rect' should be passed by const reference. However it seems that 'msUnionLayerWhichShapes' is a callback function.
passedByValue check failed
/home/runner/work/mapserver/mapserver/src/apps/tile4ms.c:175,style,knownConditionTrueFalse,Condition '!strlen(shapeFileName)' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:181,style,knownConditionTrueFalse,Condition 'msCopyHashTable(&(dst->fonts),&(src->fonts))!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:287,style,knownConditionTrueFalse,Condition 'msCopyStyle(dst->styles[i],src->styles[i])!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:356,style,knownConditionTrueFalse,Condition 'msCopyExpression(&(dst->expression),&(src->expression))!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:361,style,knownConditionTrueFalse,Condition 'msCopyExpression(&(dst->text),&(src->text))!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:386,style,knownConditionTrueFalse,Condition 'msCopyStyle(dst->styles[i],src->styles[i])!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:438,style,knownConditionTrueFalse,Condition 'msCopyHashTable(&(dst->metadata),&(src->metadata))!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:525,style,knownConditionTrueFalse,Condition 'return_value!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:550,style,knownConditionTrueFalse,Condition 'msCopyStyle(dst->styles[i],src->styles[i])!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:587,style,knownConditionTrueFalse,Condition 'msCopyExpression(&(dst->text),&(src->text))!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:620,style,knownConditionTrueFalse,Condition 'return_value!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:626,style,knownConditionTrueFalse,Condition 'return_value!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:1076,style,knownConditionTrueFalse,Condition 'return_value!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:1103,style,knownConditionTrueFalse,Condition 'return_value!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:1221,style,knownConditionTrueFalse,Condition 'return_value!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:1239,style,knownConditionTrueFalse,Condition 'return_value!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapcopy.c:1259,style,knownConditionTrueFalse,Condition 'msCopyHashTable(&(dst->configoptions),&(src->configoptions))!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapfile.c:3501,style,knownConditionTrueFalse,Condition 'initStyle(c->styles[c->numstyles])==MS_FAILURE' is always false
/home/runner/work/mapserver/mapserver/src/mapfile.c:6379,style,knownConditionTrueFalse,Condition 'msFreeLabelCacheSlot(&(cache->slots[p]))!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapquantization.c:254,style,knownConditionTrueFalse,Condition 'pam_addtoacolorhash(acht,pP,ind)<0' is always false
/home/runner/work/mapserver/mapserver/src/mapproject.c:1510,style,knownConditionTrueFalse,Condition 'msProjectShapeLine(reprojector,shape,i)==MS_FAILURE' is always false
/home/runner/work/mapserver/mapserver/src/mapsymbol.c:1034,style,knownConditionTrueFalse,Condition 'return_value!=MS_SUCCESS' is always false
/home/runner/work/mapserver/mapserver/src/mapogcsld.cpp:409,style,knownConditionTrueFalse,Condition 'lp->filter.string' is always true
knownConditionTrueFalse check failed
/home/runner/work/mapserver/mapserver/src/mapagg.cpp:1146,style,unsignedLessThanZero,Checking if unsigned expression 'hatch.total_vertices()' is less than zero.
unsignedLessThanZero check failed
/home/runner/work/mapserver/mapserver/src/mapogr.cpp:2822,error,unknownMacro,There is an unknown macro here somewhere. Configuration is required. If CPL_FRMT_GIB is a macro then please configure it.
Errors check failed
/home/runner/work/mapserver/mapserver/src/maplabel.c:1185,warning,uninitvar,Uninitialized variables: pnts1.x, pnts1.y, pnts1.z, pnts1.m
/home/runner/work/mapserver/mapserver/src/maplabel.c:1195,warning,uninitvar,Uninitialized variables: pnts2.x, pnts2.y, pnts2.z, pnts2.m
/home/runner/work/mapserver/mapserver/src/maplegend.c:66,warning,objectIndex,The address of local variable 'pixels' might be accessed at non-zero index.
/home/runner/work/mapserver/mapserver/src/maplegend.c:67,warning,objectIndex,The address of local variable 'pixels' might be accessed at non-zero index.
/home/runner/work/mapserver/mapserver/src/maplegend.c:68,warning,objectIndex,The address of local variable 'pixels' might be accessed at non-zero index.
/home/runner/work/mapserver/mapserver/src/maplegend.c:69,warning,objectIndex,The address of local variable 'pixels' might be accessed at non-zero index.
/home/runner/work/mapserver/mapserver/src/mapprimitive.c:1485,warning,invalidFunctionArg,Invalid sqrt() argument nr 1. The value is -1 but the valid values are '0.0:'.
/home/runner/work/mapserver/mapserver/src/maputil.c:1998,warning,uninitvar,Uninitialized variables: old_diffdir.z, old_diffdir.m
/home/runner/work/mapserver/mapserver/src/maputil.c:1999,warning,uninitvar,Uninitialized variables: old_offdir.z, old_offdir.m

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions