Skip to content
New issue

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

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

Already on GitHub? # to your account

Suppress warnings #10

Closed
danieleds opened this issue May 9, 2018 · 4 comments
Closed

Suppress warnings #10

danieleds opened this issue May 9, 2018 · 4 comments

Comments

@danieleds
Copy link

After including the headers, a lot of QtPromise-specific warnings are shown on compilation.

I've been able to suppress them by adding the following pragmas to "QtPromise":

#ifndef QTPROMISE_MODULE_H
#define QTPROMISE_MODULE_H

#pragma GCC diagnostic push

#pragma GCC diagnostic ignored "-Wunused-local-typedef"
#pragma GCC diagnostic ignored "-Wold-style-cast"

#include "../src/qtpromise/qpromise.h"
#include "../src/qtpromise/qpromisefuture.h"
#include "../src/qtpromise/qpromisehelpers.h"

#pragma GCC diagnostic pop

#endif // ifndef QTPROMISE_MODULE_H

It would be nice to not have to do this.

Thanks for the great library.

@simonbrunel
Copy link
Owner

@danieleds I don't have all these warnings, even when compiling with GCC. Where (and how) do you get the -Wold-style-cast warnings? I think I already fixed -Wunused-local-typedef in dcbb2ef, can you verify if that's the same issue?

@danieleds
Copy link
Author

@simonbrunel I get -Wold-style-cast in

  • qpromise.inl:216: const int count = (int)promises.size();
  • qpromise.inl:266: const int count = (int)promises.size();

About -Wunused-local-typedef yes, that's it, I'm using v0.3.0 so I didn't notice :)

@simonbrunel simonbrunel added this to the Version 0.4 milestone May 10, 2018
@simonbrunel
Copy link
Owner

Fixed in 26a2110, will be released in version 0.4

@simonbrunel
Copy link
Owner

Released in 0.4.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants