Opened 15 years ago

Closed 14 years ago

Last modified 13 years ago

#269 closed enhancement (fixed)

Silent warning on mixed class and struct keyword

Reported by: mloskot Owned by: mloskot
Priority: minor Milestone:
Component: C API Version: main
Severity: Unassigned Keywords:
Cc:

Description

It's perfectly safe to silent these warning C4099:

1>g:\dev\geos\_svn\trunk\capi\geos_c.h(738) : warning C4099: 'geos::io::WKTReader' : type name first seen using 'class' now seen using 'struct'
1>        g:\dev\geos\_svn\trunk\source\headers\geos\io\wktreader.h(59) : see declaration of 'geos::io::WKTReader'
1>g:\dev\geos\_svn\trunk\capi\geos_c.h(739) : warning C4099: 'geos::io::WKTWriter' : type name first seen using 'class' now seen using 'struct'
1>        g:\dev\geos\_svn\trunk\source\headers\geos\io\wktwriter.h(74) : see declaration of 'geos::io::WKTWriter'
1>g:\dev\geos\_svn\trunk\capi\geos_c.h(740) : warning C4099: 'geos::io::WKBReader' : type name first seen using 'class' now seen using 'struct'
1>        g:\dev\geos\_svn\trunk\source\headers\geos\io\wkbreader.h(73) : see declaration of 'geos::io::WKBReader'
1>g:\dev\geos\_svn\trunk\capi\geos_c.h(741) : warning C4099: 'geos::io::WKBWriter' : type name first seen using 'class' now seen using 'struct'
1>        g:\dev\geos\_svn\trunk\source\headers\geos\io\wkbwriter.h(73) : see declaration of 'geos::io::WKBWriter'

by putting the following pragma on top of translation units of C API:

#ifdef _MSC_VER
#pragma warning(disable : 4099)
#endif

For C++, there is no difference (in that case reported above) between struct and class keywords - C++ standard uses these keywords interchangeable.

Change History (5)

comment:1 by pramsey, 15 years ago

Milestone: 3.1.1
Owner: changed from pramsey to mloskot

Go for it, I have full trust! Please apply to 3.1 branch if appropriate and trunk.

comment:2 by pramsey, 15 years ago

Milestone: 3.1.13.1.2

comment:3 by mloskot, 14 years ago

Status: newassigned

comment:4 by mloskot, 14 years ago

Resolution: fixed
Status: assignedclosed

Fixed in trunk (r2717)

comment:5 by strk, 13 years ago

Milestone: 3.1.2

Milestone 3.1.2 deleted

Note: See TracTickets for help on using tickets.