Project

General

Profile

Bug #363

Compiler warnings in gmxcpp.c

Added by Teemu Murtola about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Erik Lindahl
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

chdir() calls in gmxcpp.c trigger compiler warnings at least with gcc 4.3.3:

src/gmxlib/gmxcpp.c: In function ‘cpp_open_file’:
src/gmxlib/gmxcpp.c|200| warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result
src/gmxlib/gmxcpp.c: In function ‘cpp_close_file’:
src/gmxlib/gmxcpp.c|450| warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result

Although only a minor annoyance, it should still be worth fixing. Checking for errors in the return value should be straightforward, the only question being how to return from the preprocessor if an error occurs.

History

#1 Updated by David van der Spoel almost 10 years ago

Fixed in the head branch. Not sure that this is crucial for the release branch as well.

Also available in: Atom PDF