Ticket #2325 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

GCC 4.3 warning for mitab

Reported by: rouault Owned by: 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 Download (423 bytes) - added by mloskot 5 years ago.
Patch fixing compilation warning about string literal to non-const char* conversion

Change History

Changed 5 years ago by mloskot

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

Changed 5 years ago by mloskot

  • cc mloskot added

Changed 5 years ago 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?

Changed 5 years ago by mloskot

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

T const* p;

as more readable convention than

const T* p;

Changed 5 years ago 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.

Note: See TracTickets for help on using tickets.