News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Warning counted like error. Help to configure the enviroment

Started by yczo, June 23, 2013, 10:25:29 PM

Previous topic - Next topic

yczo

Hello, I'm starting to use codeblocks like c/c++ IDE, over linux.

The issue is the next. This sort of warning is counted like an error.
Quote
/home/enigma/programas_C/SeriesDeNum_Partidos_1/main.cpp|12|warning: deprecated conversion from string constant to 'char* [-Wwrite-strings]|
/home/enigma/programas_C/SeriesDeNum_Partidos_1/main.cpp|20warning: deprecated conversion from string constant to 'char* [-Wwrite-strings]|
/home/enigma/programas_C/SeriesDeNum_Partidos_1/main.cpp|28|aviso: warning: deprecated conversion from string constant to 'char* [-Wwrite-strings]|
||=== Build finished: 3 errors, 0 warnings (0 minutes, 0 seconds) ===|

Please, could anyone help me to configure the editor to count like warning instead?

Thanks in advance.

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

yczo


Jenna

Please post the exact message from the "Build log" and not from the "Build message"-pane.
And use code-tags (look at the hash [ # ] in the tools-list) to enhance readability.

yczo

Quote
-------------- Build: Debug in SeriesDeNum_Partidos_1 (compiler: GNU GCC Compiler)---------------

g++ -Wall -fexceptions  -g  -g    -c /home/yczo/programas_C/SeriesDeNum_Partidos_1/main.cpp -o obj/Debug/main.o

/home/yczo/programas_C/SeriesDeNum_Partidos_1/main.cpp: In function 'int main()':
/home/yczo/programas_C/SeriesDeNum_Partidos_1/main.cpp:12:41: warning: deprecated conversion from string constant to 'char* [-Wwrite-strings]
/home/yczo/programas_C/SeriesDeNum_Partidos_1/main.cpp:20:48: warning: deprecated conversion from string constant to 'char* [-Wwrite-strings]
/home/yczo/programas_C/SeriesDeNum_Partidos_1/main.cpp:28:41: warning: deprecated conversion from string constant to 'char* [-Wwrite-strings]
g++  -o bin/Debug/SeriesDeNum_Partidos_1 obj/Debug/main.o obj/Debug/tabula.o   -lcurses  
Output size is 10,60 KB
Process terminated with status 0 (0 minutes, 0 seconds)
3 errors, 0 warnings (0 minutes, 0 seconds)

Note: The program runs even with the errors

Jenna

You can test it yourself in:
"Settings -> Compiler -> Global compiler settings -> [your compiler] -> Other settings -> Advanced options -> output parsing"

The first wanrning line gives me (rev 9156 from my repo):
Regular expression analyzed as follows:

Type: Warnung message
Filename: /home/yczo/programas_C/SeriesDeNum_Partidos_1/main.cpp
Line number: 12
Message: warning: deprecated conversion from string constant to 'char* [-Wwrite-strings]


I'm not absolutely sure, but if I remember correctly, we did not change the regexes since 12.11 release.
Did you ever play with the regexes ?
You can reset them to the defaults, but changes you have made will be lost then, of course.