Cocoanetics / DTCoreText

Methods to allow using HTML code with CoreText
BSD 2-Clause "Simplified" License
6.35k stars 1.18k forks source link

XCode 14.3 warning when compiling DTCompatibility.h #1267

Closed sadefigu closed 1 year ago

sadefigu commented 1 year ago

DTCoreText is generating a warning when being built with XCode 14.3

This is the warning: A function declaration without a prototype is deprecated in all versions of C

Here is a potential fix that is suggested by XCode

diff --git a/Pods/DTCoreText/Core/Source/DTCompatibility.h b/Pods/DTCoreText/Core/Source/DTCompatibility.h index f9dd941d8b..e05d34cf60 100644 --- a/Pods/DTCoreText/Core/Source/DTCompatibility.h +++ b/Pods/DTCoreText/Core/Source/DTCompatibility.h @@ -56,7 +56,7 @@

    // runtime-check if NS-style attributes are allowed

- static inline BOOL DTCoreTextModernAttributesPossible() +static inline BOOL DTCoreTextModernAttributesPossible(void) {

if DTCORETEXT_SUPPORT_NS_ATTRIBUTES

            if (floor(NSFoundationVersionNumber) >= DTNSFoundationVersionNumber_iOS_6_0)

@@ -68,7 +68,7 @@ }

    // runtime-check if CoreText draws underlines

- static inline BOOL DTCoreTextDrawsUnderlinesWithGlyphs() +static inline BOOL DTCoreTextDrawsUnderlinesWithGlyphs(void) { if (floor(NSFoundationVersionNumber) >= DTNSFoundationVersionNumber_iOS_7_0) {

sadefigu commented 1 year ago

The fix has been merged.