Jump to content

Build error/warning problem!?


pasdVn

Recommended Posts

Hey guys,

stupid topic-subject, but I did not find a better one :x. I want to use Codblocks as an confortable IDE to develope mangos at linux (ubuntu in detail). Therefore I use the auto-generated makefiles, what works quite well. I just have a single problem when building the "thread building blocks" library: During the buildprocess there is a single output at std:error:

../../../dep/tbb/build/Makefile.tbb:39: CONFIG: cfg=release arch=intel64 compiler=gcc os=linux runtime=cc4.4.4_libc2.12.1_kernel2.6.35

I would not mind this sensless error/warning, but Codeblocks can not parse this output and so identifies this as an error (so the build was not successfull for C::B). As much as I could find out, normal warnings of gcc always consist of line that prints out the file and and a next one, that specifies the line and contains the word "warning" like this (C::B uses regexes to parse this output):

../../../../src/game/vmap/MapTree.cpp: In member function 'bool VMAP::StaticMapTree::LoadMapTile(uint32, uint32, VMAP::VMapManager2*)':
../../../../src/game/vmap/MapTree.cpp:383: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result

Can anybody give me a hint, what the error/warning above is about, or how I can fix it, that it get's printed to std::out? I not very used to the whole gnu autobuild tools and have no idea where to start to fix it.

As a walkaround I could redirect std::error to /dev/null or anywhere else, but I don't want to do it, if I don't have to :-/.

pasdVn

Link to comment
Share on other sites

Can't say anything about first case. So about second:

fread call return amount really read data from requested in args.

For really 100% safe code work need check return amount by compare with expected and process this in some way.

We not always check thsi when expected "right" file structure. Ok, this not safe, i agree, but low chance problems in most like cases. Maybe fixing can be good but not high prio.

Link to comment
Share on other sites

Ok. The second one was in fact just an example how warnings are printed out normally (as much as I understand it), and how C::B can parse and recognize them as warnings.

The question is, if the first message is really a kind of error/warning, or if it just missdirected to std::error.

If it is a warning, why has it not the format of other warnings.

If it is an error, why is the build successfull^^?

Link to comment
Share on other sites

From dep/tbb/build/Makefile.tbb

#------------------------------------------------------------
# Define static pattern rules dealing with .cpp source files
#------------------------------------------------------------
# MaNGOS changes
# $(warning CONFIG: cfg=$(cfg) arch=$(arch) compiler=$(compiler) os=$(tbb_os) runtime=$(runtime))
# MaNGOS changes end

It's a built in warning. Guess you can delete it, if not wanted.

Regards

Skirnir

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use