Ticket #2325 (closed defect: fixed)

Opened 4 months ago

Last modified 3 weeks ago

GCC 4.3 warning for mitab

Reported by: rouault Assigned to: dmorissette
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords: mitab gcc 4.3
Cc: mloskot

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

ticket-2325.patch (423 bytes) - added by mloskot on 07/19/08 02:34:11.
Patch fixing compilation warning about string literal to non-const char* conversion

Change History

07/19/08 02:34:11 changed by mloskot

  • attachment ticket-2325.patch added.

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

07/19/08 02:34:23 changed by mloskot

  • cc set to mloskot.

07/21/08 11:30:00 changed by dmorissette

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?

07/21/08 11:45:53 changed by mloskot

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

T const* p;

as more readable convention than

const T* p;

07/21/08 14:26:16 changed by dmorissette

  • status changed from new to closed.
  • resolution set to fixed.

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.