The issue is that SDL_GetWindowWMInfo returns a SDL_bool enumeration type rather than a standard bool. It should be noted that SDL_GetWMInfo used later in this function returns a int type instead and thus will cast to bool without warning.