commit b3f0243

Michael Forney  ·  2016-04-30 10:02:46 +0000 UTC
parent e88d5f1
cursor: Avoid use of zero-size array
1 files changed,  +5, -5
+5, -5
 1@@ -80,7 +80,7 @@ struct pcf_header {
 2 		int32_t format;
 3 		int32_t size;
 4 		int32_t offset;
 5-	} tables[0];
 6+	} tables[];
 7 };
 8 
 9 struct compressed_metrics {
10@@ -105,11 +105,11 @@ struct metrics {
11 	union {
12 		struct {
13 			int16_t count;
14-			struct compressed_metrics compressed_metrics[0];
15+			struct compressed_metrics compressed_metrics[];
16 		} compressed;
17 		struct {
18 			int32_t count;
19-			struct uncompressed_metrics uncompressed_metrics[0];
20+			struct uncompressed_metrics uncompressed_metrics[];
21 		} uncompressed;
22 	};
23 };
24@@ -117,13 +117,13 @@ struct metrics {
25 struct glyph_names {
26 	int32_t format;
27 	int32_t glyph_count;
28-	int32_t offsets[0];
29+	int32_t offsets[];
30 };
31 
32 struct bitmaps {
33 	int32_t format;
34 	int32_t glyph_count;
35-	int32_t offsets[0];
36+	int32_t offsets[];
37 };
38 
39 static void