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

Compilation error due to disallowed pointer arith #63

Open
AMDmi3 opened this issue Dec 14, 2017 · 0 comments
Open

Compilation error due to disallowed pointer arith #63

AMDmi3 opened this issue Dec 14, 2017 · 0 comments

Comments

@AMDmi3
Copy link

AMDmi3 commented Dec 14, 2017

Application.cpp:433:25: error: ordered comparison between pointer and zero ('void *' and 'int')                                                                                                                                                                      
    if( m_raiseHotKeyId >= 0 )                                                                                                                                                                                                                                       
        ~~~~~~~~~~~~~~~ ^  ~                                                                                                                                                                                                                                         
1 error generated.                                                                                                                                                                                                                                                   

The actual problem is that (void*)-1 is used as a magic value to denote (an unassigned?) key.

Application::Application(int& argc, char** argv) 
    :unicorn::Application( "fm.last.Scrobbler", argc, argv )
    , m_raiseHotKeyId( (void*)-1 )

I'd guess that itself is an undefined bahavior.

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

No branches or pull requests

1 participant