x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Errors building with Clang 3.8: "ignoring return value of function"

I'm getting errors like this that prevent building with Clang 3.8 on Arch Linux:

 UnrealEngine/Engine/Source/Runtime/Core/Private/Linux/LinuxPlatformMisc.cpp:103:3: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result]
     fscanf(SysFsFile, "%d", &SystemLineSize);

Here's my build log.

Clang is asking to check the result of these functions instead of ignoring it. I was thinking of submitting a PR, but I'm not sure how to handle the case when they don't return "1". It seems that would indicate a serious problem, so should the editor just exit at that point?

As a quick fix, is there somewhere I can add "-Wno-unused-result" as a build flag?

Thanks!

Product Version: UE 4.12
Tags:
report.txt (10.9 kB)
more ▼

asked Jun 30 '16 at 12:12 AM in Linux

avatar image

psilly
36 2 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You can add that to LinuxToolchain.cs, GetCLArguments_Global() function.

more ▼

answered Jun 30 '16 at 01:34 PM

avatar image

RCL STAFF
2.7k 59 6 88

avatar image psilly Jun 30 '16 at 10:34 PM

Thanks, that worked. Here's my patch for reference.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question