Opened 16 years ago

Closed 16 years ago

#2325 closed defect (fixed)

GCC 4.3 warning for mitab

Reported by: Even Rouault Owned by: Daniel Morissette
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords: mitab gcc 4.3
Cc: Mateusz Łoskot

Description

mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’ mitab_utils.cpp:685: warning: deprecated conversion from string constant to ‘char*’

Attachments (1)

ticket-2325.patch (423 bytes ) - added by Mateusz Łoskot 16 years ago.
Patch fixing compilation warning about string literal to non-const char* conversion

Download all attachments as: .zip

Change History (5)

by Mateusz Łoskot, 16 years ago

Attachment: ticket-2325.patch added

Patch fixing compilation warning about string literal to non-const char* conversion

comment:1 by Mateusz Łoskot, 16 years ago

Cc: Mateusz Łoskot added

comment:2 by Daniel Morissette, 16 years ago

mloskot, what is the difference between what you used in the patch

  char const* pszAbbrev;

and the more familiar form below?

  const char * pszAbbrev;

Could we not use the second one instead to avoid confusion or is there really a difference between the two?

comment:3 by Mateusz Łoskot, 16 years ago

These two have the same effect. I just use the following

T const* p;

as more readable convention than

const T* p;

comment:4 by Daniel Morissette, 16 years ago

Resolution: fixed
Status: newclosed

I've used the 'const char * pszAbbrev;' form since that's what is used everywhere else in MITAB.

Committed to MITAB CVS upstream, and sync'd GDAL SVN trunk with current dev version of MITAB in r14983.

Note: See TracTickets for help on using tickets.