CBXE8 - How to turn off warning message in Android compile ?

*Embarcadero® C++Builder XE8 Version 22.0.19027.8951 and Indy 10.*
*Window 10 Pro x64*


1. Is there a way to turn off warning message during android compile such as warning message shown below ?

*[bccaarm Warning] _gen.h(1184): conversion from string literal to 'char *' is deprecate*

Please advise.
8/13/2015 3:55:27 AM
embarcadero.cppbuilder.ide 2180 articles. 1 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 29
Get it on Google Play
Get it on Apple App Store

GAI wrote:

> Is there a way to turn off warning message during android compile
> such as warning message shown below ?
> *[bccaarm Warning] _gen.h(1184): conversion from string literal to
> 'char *' is deprecate*

The real solution is to fix your code.  The Clang-based compilers (which 
includes Android) implement C++11, and assigning a string literal to a non-const 
char* pointer is deprecated by the C++11 standard.  You have to use a const 
pointer instead (which you should do anyway, since string literals are pointers 
to read-only memory):

//char *ptr = "some literal"; // deprecated
const char *ptr = "some literal";

That being said, to answer your question, only the Win32 and OSX compilers 
(which do not implement C++11 yet) allow you to enable/disable individual 
warnings.  For other compilers, it is an all-or-none deal.  This is documented 

C++ Compiler Warnings

Enable selected warnings 

Enables only the warning that are set to True. C++ Warning messages are described 
in Compiler Errors And Warnings (C++) Index. Default = True

Compiler switches:
bcc32: -w<warning code> See C++ Warnings topic for the warning codes.
bcc64: Platform not supported
bccosx: -w<warning code> See C++ Warnings topic for the warning codes
bcciosarm: Platform not supported
bcciosarm64: Platform not supported
bcciosarm: Platform not supported

This is enforced by the fact that the "Project Options | C++ Compiler | Warnings" 
dialog provides checkboxes for individual warnings only for Win32 and OSX 

However, all is not entirely lost:

Errors and Warnings of Clang-based C++ Compilers

Common Warnings Porting from BCC32 

Code ported from BCC32 may exhibit some of these warnings (listed alphabetically), 
which may be suppressed. 


Conversion from string literal to 'char *' is deprecated 


Assigning a plain char pointer to a literal C-string is discouraged. Make 
the pointer const (and if appropriate, consider using std::string). 

You could try adding the "-Wno-deprecated-writable-strings" flag to the compiler 
options for the Clang-based compilers, either in the Project Options (Project 
Options | C++ Compiler | Advanced | Additional options to pass to the compiler) 
or in code:

#pragma option push -Wno-deprecated-writable-strings
char *ptr = "some literal"; // deprecated but suppressed warning
#pragma option pop

The Win32 and OSX compilers does not implement C++11 yet, so the deprecation 
does not apply to them.

Remy Lebeau (TeamB)
8/13/2015 6:18:10 AM
+*>....try adding the "-Wno-deprecated-writable-strings...*+
- Yes, is working now. Thanks again Remy.
8/14/2015 12:55:23 AM

Similar Artilces:

How do i turn off compiler warnings?
I am using VS2008 to create a web application against framework 3.5 In the windows forms designer, i can go to "My Project" in solution explorer and under the Compile tab i can turn warnings on or off using the grid. This is excellent, because although im posting in the getting started area, ive been developing for a quite some time and while it may be useful to some, i really dont need VS telling me that variables are being used before being assigned a value.  When i create a new web application using the same version of visual studio, for starters i don'...

Turning compile-time warnings off for good
Hi, We have a large code base that=E2=80=99s currently running in production = on perl 5.14.2, and we need to move it to a newer Perl. We=E2=80=99re = currently targeting 5.20.3 because we also use Coro and that blows up on = 5.22.x. We also (a) use smartmatch extensively (albeit only in its =E2=80=9Cis = this scalar part of this array=E2=80=9D behaviour), and (b) use Moose = and Dancer. For the version of Perl we=E2=80=99re targeting, we can safely ignore = all of the experimental warnings about smartmatch. The problem is that if I say no warnings =E2=80=98experimental::smar...

[COMMIT] Turn on compiler warnings for IMCC
Hi, I've just noticed that we've been building IMCC without any of our customary set of compiler warnings switched on. This is fairly easy to fix, but unsurprisingly has revealed a bunch of warnings that need to be eliminated. I've fixed a number of the more simple ones, and hope to tackle the others over the next few days. Simon ...

macro to show warning message during compilation
This is not a asp.net specific question but here goes - I've commented a piece of code (in the code behind) just to make my project compile but I want to be reminded that I have to fix the implementation, Is there some sort of a compiler macro that will send a message to the output window during compilation? If you comment the line with 'TODO: it will show up in your task list under 'Comments' section, so you can say 'TODO: fix this section of code and it will help remind you....

What Compiler Hints and Warnings to Turn off To Get Rid of W1057 and W1058 [Edit]
I just upgraded from Delphi 3 to Delphi 2010. I use Delphi to make programs for my personal use so I don't really care if it uses Unicode. Most of my programs involve a of of straight forward string manipulation, nothing fancy. A major reason why I like Delphi is because it is stongly typed and if I can get a program to compile then I am most of the way home toward a debugged program. The huge number of Warnings I get from compiling under Delphi 2010 for programs that worked fine in Delphi 3 is very much of concern to me. I'd rather "fix' the issues rather than ignore a...

Can not compile Android App
Hi, I am currently using Delphi XE5 Enterprise and for months now I am porting our older Windows FMX application to Android. I got me a new computer because the android compiler is so damn slow. It's still awful but a little better than on my older machine. My current project has circa 100.000 lines. After start compiling to andoid (Nexus 10, Motorola Razr HD) the IDE is crashing at line about 25000+ with Error message: "System Error. Code: 8. Not enough storage is available to process this command" and the IDE crashes. The BDE mem alloc size at that moment is about 1.25 G...

Message Read messages want turned off
How do I turn off the messages that gw sends out when a messages is read that someone has sent. This is only happening when someone from the outside world emails us. I just want to turn it off. -- dreierd ------------------------------------------------------------------------ * dreierd, disable DSN: http://www.novell.com/documentation/gw7/gw7_admin/data/a2zi22h.html#ab35g12 HTH Uwe Hi, dreierd wrote: > > How do I turn off the messages that gw sends out when a messages is read > that someone has sent. This is only happening when someone from the ...

Active X Warning message in some messages
Hi There! I have a question regarding the default behaviour of GW8 and HTML messages. I have been having a conversation with a client who obviously uses Outlook and or Exchange. Some of his messages when I open them have a yellow bar across them stating that GW has restricted this webpage from running scripts or ActiveX Controls that could access your computer. Why do some messages in our conversation have this and not others, yet they are just replies? Secondly how can I stop that message from coming up? Andre Southgate wrote: > Hi There! > > I have a question...

D107 and Messages Turning to Posted Messages?
Hello, We have been having this happen more frequently lately where a message in a mailbox or folder will "turn into" a posted message. Meaning that next to the envelope there is a little pushpin icon. Some one else that was copied on one of these messages but doesn't have the pushpin gets a D107 error when trying to access the properties of the message. And no one can view the contents of the message. We have recently updated to GW 8.0.2. It is running on OES2 Linux. The clients are a mix from 7.0 up to 8.0.2, all running Windows XP. We have a single PO...

Compiler Error Message: The compiler failed with error code1.
 Hi all, I just installed the software which was fine and no errors... when i went to run it first time at local host it came up with the following error... anyone know what this means?? I have created different ASP.NET projects and it runs no problem... Regards Sicose Server Error in '/PortalVBSDK' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: The compiler failed...

Compiler message for regcomp.c and compiled-in Unicode properties
I neglected to mention in my earlier post that there currently is a compiler message generated by gcc for regcomp.c. (There are messages from several other .c files as well that don't seem to bother people.) The message is actually very misleading. It is the result of a macro generating this code (foo ? bar : bar) That is bar is selected no matter what the value of foo may be. There are two easy solutions to getting rid of this. One is to create a new macro which is a copy of the current one, but slightly modified so as to not use the test and unconditionally sel...

Compile warning...
What is this??? Library: D:\Program Files\Powersoft\PB6\adk\pfc\pfcapsrv.pbl Object: pfc_n_cst_dwcache Instance Variables (0023): Warning C0190: Instance variables of local structure type ('os_cachelist') will be implicitly private in the next release. It is a indicator for an upcoming change in the PowerScript language. Starting from version 7.0, object structures will be private, thus inaccessible by other objects (including descendants.) To get rid of this message, you can do one of two things: 1. Replace the structure with an NVO wit...

Compiler warnings, but why ?
Hello. I wrote this code. It works fine. However, VS gives me warnings on "table" tagsoverlapping and "tr" being nested within "form" tags. Is my code illegal ? Why do I have these warnings ? Is there any other way to do it ? I tried, but the table looks bad.... Thank you Alex. <asp:Repeater id="Repeater1" runat="server" EnableViewState="False"> <HeaderTemplate> <table cellpadding="3" border="1"> <tr bgcolor="#cc9900"> <th> ...

Turning Off Messaging
--____SDIIHWEFOIXLXZGTOJSP____ Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Is there a way to turn off messaging so that you don't receive any Novell = Messages.=20 We use them a lot here at the office but I want to be able to turn them = off for one user while she is giving a Webcast. TJ --____SDIIHWEFOIXLXZGTOJSP____ Content-Type: multipart/related; boundary="____NEEXULTDCKRIAHRLMOSS____" --____NEEXULTDCKRIAHRLMOSS____ Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable ...

Web resources about - CBXE8 - How to turn off warning message in Android compile ? - embarcadero.cppbuilder.ide

Ballistic Missile Early Warning System - Wikipedia, the free encyclopedia
Site I- A United States Air Force facility at Thule Air Base , Greenland , ( 76°34′08″N 68°19′05″W  /  76.569°N 68.318°W  / 76.569; -68.318 ...

WARNING: Zeus Trojan Using Facebook Login Pages As Bait To Target Credit-Card Info
The Zeus Trojan is on the prowl again, hungry for credit-card information and other personal data, and Facebook is being used as the bait. continued… ...

Travel warnings for France, Belgium - AdelaideNow Search Search
AUSTRALIANS travelling to France and Belgium are being urged to exercise a high degree of caution a week on from the deadly attacks in Paris. ...

Warning against super changes
Slattery says debate over changes to super threatens public confidence in the system.

Emergency warning declared for Esperance again - threatening lives and homes
Another emergency warning has been issued for parts of Esperance just as firefighters had battled throughout the day on Saturday to ease a fire ...

Queensland weather: Latest storm warning information
PARTS of Queensland were hit by severe storms, with golf-ball-size hail in the Granite Belt Monday afternoon.

Travel warnings for France, Belgium
AUSTRALIANS travelling to France and Belgium are being urged to exercise a high degree of caution a week on from the deadly attacks in Paris. ...

Indonesia beefs up security after Paris attacks amid warnings of rising violence
The risk of violence in Indonesia is rising after recent terrorist attacks - but a co-ordinated attack on the scale of Paris is highly unlikely, ...

Chicago Weather: Winter Storm Warning in effect through Saturday afternoon
WLS-TV Chicago Weather: Winter Storm Warning in effect through Saturday afternoon WLS-TV Snow will begin falling Friday evening and continue ...

WARNING: Change your Amazon password now — Amazon suffers potential password leak
The Black Friday 2015 shopping season is upon us and Amazon's big Black Friday sale is in full swing , but some Amazon customers have received ...

Resources last updated: 11/24/2015 6:40:06 PM