Skip to content

Compilation error due to disallowed pointer arith #63

@AMDmi3

Description

@AMDmi3
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions