]> granicus.if.org Git - libass/commitdiff
coretext: don't use a variable-length array
authorOleg Oshmyan <chortos@inbox.lv>
Tue, 13 Oct 2015 23:05:54 +0000 (02:05 +0300)
committerOleg Oshmyan <chortos@inbox.lv>
Tue, 31 Oct 2017 11:59:11 +0000 (13:59 +0200)
This fixes compilation with GCC, which complains that a
variable-length array declaration must not have an initializer.

libass/ass_coretext.c

index aed4b02e87984c0534f1df67bdb58332ca799485..a52ead589a32718e198aa69e96dcd179d1ccf2e7 100644 (file)
@@ -232,7 +232,7 @@ static void process_descriptors(ASS_FontProvider *provider, CFArrayRef fontsd)
 static void match_fonts(ASS_Library *lib, ASS_FontProvider *provider,
                         char *name)
 {
-    const size_t attributes_n = 3;
+    enum { attributes_n = 3 };
     CTFontDescriptorRef ctdescrs[attributes_n];
     CFMutableDictionaryRef cfattrs[attributes_n];
     CFStringRef attributes[attributes_n] = {