Nikolay Sivov (@nsivov) commented about dlls/d2d1/factory.c:
} factory_options.debugLevel = properties->debugLevel;
- if (FAILED(hr = D2D1CreateFactory(properties->threadingMode,
- if (FAILED(hr = D2D1CreateFactory((D2D1_FACTORY_TYPE)properties->threadingMode, &IID_ID2D1Factory1, &factory_options, (void **)&factory))) return hr;
These are different enough I think, it's better to convert them explicitly, instead of a cast.