[LU-6394] compile errors when _FORTIFY_SOURCE is used Created: 20/Mar/15  Updated: 09/Feb/17  Resolved: 06/Apr/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0, Lustre 2.8.0
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Minor
Reporter: Frank Zago (Inactive) Assignee: Dmitry Eremin (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Duplicate
Related
is related to LU-2753 Tracking bug for static code analysis... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

When Lustre is configured with CFLAGS="-D_FORTIFY_SOURCE=2 -O2" on Centos 6, the compilation will fails with errors such as this one:

cacheio.c: In function ‘qword_printhex’:
cacheio.c:174: error: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result

The value is usually ignored because it doesn't matter.

Note that these errors tend to show on more modern distributions, that have _FORTIFY_SOURCE on by default.



 Comments   
Comment by Gerrit Updater [ 20/Mar/15 ]

frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/14126
Subject: LU-6394 all: fix compilation errors with FORTIFY_SOURCE
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5844b42271ebb42aff86e27e96b55bdec50efd9a

Comment by Jodi Levi (Inactive) [ 23/Mar/15 ]

Hi Dmitry,
Could you take this one?
Thank you!

Comment by Gerrit Updater [ 06/Apr/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14126/
Subject: LU-6394 all: fix compilation errors with FORTIFY_SOURCE
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c58d3c5a102f97c6014b9a6342e6f7afd3a5cf5c

Generated at Sat Feb 10 01:59:50 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.