microsoft / onnxruntime-extensions

onnxruntime-extensions: A specialized pre- and post- processing library for ONNX Runtime
MIT License
295 stars 80 forks source link

Fix several C5038 warnings #748

Closed skyline75489 closed 2 weeks ago

skyline75489 commented 2 weeks ago
wenbingl commented 2 weeks ago

/azp run onnxruntime-extensions.CI

azure-pipelines[bot] commented 2 weeks ago
Azure Pipelines successfully started running 1 pipeline(s).
wenbingl commented 2 weeks ago
  • warning C5038: data member 'ortextensions::ImageProcessor::allocator' will be initialized after base class 'OrtxObjectImpl'
  • warning C5038: data member 'ortextensions::OrtxRunner::allocator' will be initialized after data member 'ortextensions::OrtxRunner::ops'

Thanks for the fixing,

How do you find this issue? From https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=msvc-170, the warning is off by default.

skyline75489 commented 2 weeks ago

Suggested by Changming, ORT uses /WX, which treats all warnings as errors. In ort-genai, we try to accomplish the same