When compile an application on RHEL6 the compiler shows a lot of "warning: deprecated conversion from string constant to char*" messages

Solution Unverified - Updated -

Issue

While doing application module compilation on a RHEL 6 environment we get some warnings (those warning are treated as errors and compilation getting aborted).
The same module compilation work without any errors in our RHEL 5 environment.

warning: deprecated conversion from string constant to char*

Example of problematic code:

Char  * txt;
Txt=”String literal”;

Environment

  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.