Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 17 g++ 7.2 Compatible #7

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

Abddo9
Copy link

@Abddo9 Abddo9 commented Apr 28, 2018

This modification was made because the project was not compiling with Ubununtu 17 and g++ 7.2
this version should be backward compatible (I have tried also on Ubuntu 14.04.5 LTS with g++ 5.4.1)
it was based on "*NIX compatibility by HippoBaro" pull request
on the GridGraph repository,
The modifications were to silence couple of warnings that are treated as errors in couple of files and preventing the project from compiling

to clone this pull request:
git clone https://github.com/thu-pacman/GridGraph.git
cd GridGraph
git fetch origin pull/7/head
git checkout -b pullrequest FETCH_HEAD

to compile
mkdir build
cd build
cmake ..
make

@HippoBaro
Copy link

HippoBaro commented Apr 28, 2018

Please squash your commits to discard the spurious additions/deletions to the patch.

It seems the only modifications you made was to declare return variables for various function calls. Seems to me like a bad way to solve the problem. Your standard library might have flagged those functions with warn_unused_result, which is a GCC attribute. Passing -Wno-unused-result to gcc will be a better way of handling that.
IMO the variables that you introduced aren't useful as they are, because you just return in case of errors, resuming normal control flow.

As for merging this, I think you'd be better off just committing on my branch since the changes are minor and fix something that should have been in my commits (sorry for that! 🙄)

Anyway thanks for catching that, my GCC 7.3.1 on Fedora 27 didn't have that problem.

@Abddo9
Copy link
Author

Abddo9 commented Apr 30, 2018

Yeah, I just wanted to give (whoever wants to try this project) a version that compiles without having troupes to search and ask around about how to compile it, and I agree a better solution would have been to do a real check on the return value for errors and may be through an exception (by the way I am just doing a fake check to get it to compile).
and for the number of changes, I think they look many because they are compared to the master branch, but when the owner merge your pull-request and compare again they should be less.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants