Opened 3 years ago

Closed 3 years ago

#6685 closed defect (fixed)

CPL_DISALLOW_COPY_ASSIGN triggers extra ";" warnings

Reported by: behrisch Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 2.1.1
Severity: minor Keywords:
Cc:

Description (last modified by behrisch)

The macro itself has a ";" at the end and many usages also have an ";". When compiling with gcc having "-pedantic" enabled this triggers warning for every inclusion of an affected header file. This applies not only to the compilation of gdal but also to all users of the C/C++-library.

One should fix the files which use the macro using the attached patch.

Attachments (1)

gdal-cpl-port-pedantic.patch (8.7 KB) - added by behrisch 3 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 3 years ago by behrisch

Description: modified (diff)

Changed 3 years ago by behrisch

comment:2 Changed 3 years ago by behrisch

Description: modified (diff)

comment:3 Changed 3 years ago by Even Rouault

Resolution: fixed
Status: newclosed

In 35751:

Remove semi-colon at end of use of CPL_DISALLOW_COPY_ASSIGN macro (patch by behrisch, fixes #6685)

Note: See TracTickets for help on using tickets.