johnxnguyen / Down

Blazing fast Markdown / CommonMark rendering in Swift, built upon cmark.
Other
2.24k stars 319 forks source link

Resolve project "Implicit conversion loses integer precision: ..." warnings #276

Open ftronnbe opened 2 years ago

ftronnbe commented 2 years ago

Description

Warnings like

⚠️ Implicit conversion loses integer precision: 'long' to 'bufsize_t' (aka 'int')

began showing up in Xcode 13. This PR makes such implicit conversions explicit. Technically the additions in this PR effectively silence these warnings.

What to test

Nothing really. This just makes the conversion more explicit.

gongzhang commented 12 months ago

Are you using Swift Package Manager? I think cLanguageStandard should be add to the Package.swift manifest to keep consistent with the xproj file. No need to modify cmark source code.

image
gongzhang commented 12 months ago

Are you using Swift Package Manager? I think cLanguageStandard should be add to the Package.swift manifest to keep consistent with the xproj file. No need to modify cmark source code.

image

Sorry. The warnings are still there after adding cLanguageStandard.