Fixed defects

List of Defects

Error: COMPILER_WARNING (CWE-704): [#def1]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region32_copy’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:511:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:511:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-private.h:25: included_from: Included from here.
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:29: included_from: Included from here.
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
#  509|   {
#  510|       GOOD (dst);
#  511|->     GOOD (src);
#  512|   
#  513|       if (dst == src)

Error: COMPILER_WARNING (CWE-704): [#def2]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region_copy’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:511:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:511:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-private.h:25: included_from: Included from here.
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:31: included_from: Included from here.
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
#  509|   {
#  510|       GOOD (dst);
#  511|->     GOOD (src);
#  512|   
#  513|       if (dst == src)

Error: COMPILER_WARNING (CWE-704): [#def3]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region32_intersect’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1161:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1161:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 1159|                        const region_type_t *        reg2)
# 1160|   {
# 1161|->     GOOD (reg1);
# 1162|       GOOD (reg2);
# 1163|       GOOD (new_reg);

Error: COMPILER_WARNING (CWE-704): [#def4]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region_intersect’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1161:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1161:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 1159|                        const region_type_t *        reg2)
# 1160|   {
# 1161|->     GOOD (reg1);
# 1162|       GOOD (reg2);
# 1163|       GOOD (new_reg);

Error: COMPILER_WARNING (CWE-704): [#def5]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1162:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1162:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 1160|   {
# 1161|       GOOD (reg1);
# 1162|->     GOOD (reg2);
# 1163|       GOOD (new_reg);
# 1164|   

Error: COMPILER_WARNING (CWE-704): [#def6]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1162:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1162:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 1160|   {
# 1161|       GOOD (reg1);
# 1162|->     GOOD (reg2);
# 1163|       GOOD (new_reg);
# 1164|   

Error: COMPILER_WARNING (CWE-704): [#def7]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region32_union’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1378:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1378:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 1376|        * between reg1, reg2
# 1377|        */
# 1378|->     GOOD (reg1);
# 1379|       GOOD (reg2);
# 1380|       GOOD (new_reg);

Error: COMPILER_WARNING (CWE-704): [#def8]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region_union’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1378:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1378:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 1376|        * between reg1, reg2
# 1377|        */
# 1378|->     GOOD (reg1);
# 1379|       GOOD (reg2);
# 1380|       GOOD (new_reg);

Error: COMPILER_WARNING (CWE-704): [#def9]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1379:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1379:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 1377|        */
# 1378|       GOOD (reg1);
# 1379|->     GOOD (reg2);
# 1380|       GOOD (new_reg);
# 1381|   

Error: COMPILER_WARNING (CWE-704): [#def10]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1379:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1379:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 1377|        */
# 1378|       GOOD (reg1);
# 1379|->     GOOD (reg2);
# 1380|       GOOD (new_reg);
# 1381|   

Error: COMPILER_WARNING (CWE-704): [#def11]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region32_subtract’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1961:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1961:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 1959|                       const region_type_t *reg_s)
# 1960|   {
# 1961|->     GOOD (reg_m);
# 1962|       GOOD (reg_s);
# 1963|       GOOD (reg_d);

Error: COMPILER_WARNING (CWE-704): [#def12]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region_subtract’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1961:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1961:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 1959|                       const region_type_t *reg_s)
# 1960|   {
# 1961|->     GOOD (reg_m);
# 1962|       GOOD (reg_s);
# 1963|       GOOD (reg_d);

Error: COMPILER_WARNING (CWE-704): [#def13]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1962:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1962:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 1960|   {
# 1961|       GOOD (reg_m);
# 1962|->     GOOD (reg_s);
# 1963|       GOOD (reg_d);
# 1964|       

Error: COMPILER_WARNING (CWE-704): [#def14]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1962:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:1962:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 1960|   {
# 1961|       GOOD (reg_m);
# 1962|->     GOOD (reg_s);
# 1963|       GOOD (reg_d);
# 1964|       

Error: COMPILER_WARNING (CWE-704): [#def15]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region32_inverse’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2028:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2028:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 2026|       region_type_t inv_reg; /* Quick and dirty region made from the
# 2027|   			    * bounding box */
# 2028|->     GOOD (reg1);
# 2029|       GOOD (new_reg);
# 2030|       

Error: COMPILER_WARNING (CWE-704): [#def16]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region_inverse’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2028:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2028:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 2026|       region_type_t inv_reg; /* Quick and dirty region made from the
# 2027|   			    * bounding box */
# 2028|->     GOOD (reg1);
# 2029|       GOOD (new_reg);
# 2030|       

Error: COMPILER_WARNING (CWE-704): [#def17]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region32_contains_rectangle’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2125:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2125:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 2123|       int x, y;
# 2124|   
# 2125|->     GOOD (region);
# 2126|   
# 2127|       numRects = PIXREGION_NUMRECTS (region);

Error: COMPILER_WARNING (CWE-704): [#def18]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region_contains_rectangle’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2125:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2125:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 2123|       int x, y;
# 2124|   
# 2125|->     GOOD (region);
# 2126|   
# 2127|       numRects = PIXREGION_NUMRECTS (region);

Error: COMPILER_WARNING (CWE-704): [#def19]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region32_contains_point’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2353:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2353:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 2351|       int numRects;
# 2352|   
# 2353|->     GOOD (region);
# 2354|       numRects = PIXREGION_NUMRECTS (region);
# 2355|   

Error: COMPILER_WARNING (CWE-704): [#def20]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region_contains_point’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2353:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2353:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 2351|       int numRects;
# 2352|   
# 2353|->     GOOD (region);
# 2354|       numRects = PIXREGION_NUMRECTS (region);
# 2355|   

Error: COMPILER_WARNING (CWE-704): [#def21]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region32_empty’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2392:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2392:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 2390|   PREFIX (_empty) (const region_type_t * region)
# 2391|   {
# 2392|->     GOOD (region);
# 2393|   
# 2394|       return(PIXREGION_NIL (region));

Error: COMPILER_WARNING (CWE-704): [#def22]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region_empty’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2392:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2392:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 2390|   PREFIX (_empty) (const region_type_t * region)
# 2391|   {
# 2392|->     GOOD (region);
# 2393|   
# 2394|       return(PIXREGION_NIL (region));

Error: COMPILER_WARNING (CWE-704): [#def23]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region32_not_empty’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2400:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2400:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 2398|   PREFIX (_not_empty) (const region_type_t * region)
# 2399|   {
# 2400|->     GOOD (region);
# 2401|   
# 2402|       return(!PIXREGION_NIL (region));

Error: COMPILER_WARNING (CWE-704): [#def24]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region_not_empty’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2400:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2400:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 2398|   PREFIX (_not_empty) (const region_type_t * region)
# 2399|   {
# 2400|->     GOOD (region);
# 2401|   
# 2402|       return(!PIXREGION_NIL (region));

Error: COMPILER_WARNING (CWE-704): [#def25]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region32_extents’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2408:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region32_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region32.c:42:36: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2408:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:749:80: note: expected ‘pixman_region32_t *’ {aka ‘struct pixman_region32 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region32 *’}
# 2406|   PREFIX (_extents) (const region_type_t * region)
# 2407|   {
# 2408|->     GOOD (region);
# 2409|   
# 2410|       return(box_type_t *)(&region->extents);

Error: COMPILER_WARNING (CWE-704): [#def26]
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c: scope_hint: In function ‘pixman_region_extents’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2408:11: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘pixman_region_selfcheck’ discards ‘const’ qualifier from pointer target type
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region16.c:44:34: note: in definition of macro ‘PREFIX’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman-region.c:2408:5: note: in expansion of macro ‘GOOD’
pixman-0.43.0-build/pixman-0.43.0/pixman/pixman.h:605:78: note: expected ‘pixman_region16_t *’ {aka ‘struct pixman_region16 *’} but argument is of type ‘const region_type_t *’ {aka ‘const struct pixman_region16 *’}
# 2406|   PREFIX (_extents) (const region_type_t * region)
# 2407|   {
# 2408|->     GOOD (region);
# 2409|   
# 2410|       return(box_type_t *)(&region->extents);

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-53.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namepixman-0.43.4-1.fc41
diffbase-store-results-to/tmp/tmplbs8numd/pixman-0.43.4-1.fc41.tar.xz
diffbase-time-created2024-07-03 16:57:40
diffbase-time-finished2024-07-03 16:59:30
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmplbs8numd/pixman-0.43.4-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmplbs8numd/pixman-0.43.4-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-53.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namepixman-0.43.0-3.fc40
store-results-to/tmp/tmp1luxjja1/pixman-0.43.0-3.fc40.tar.xz
time-created2024-07-03 16:55:18
time-finished2024-07-03 16:57:31
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp1luxjja1/pixman-0.43.0-3.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp1luxjja1/pixman-0.43.0-3.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9