Removed
Link Here
|
1 |
extern/ttconv/pprdrv_tt.cpp:245:41: error: cast from pointer to smaller type 'char' loses information |
2 |
font->Copyright[length]=(char)NULL; |
3 |
^~~~~~~~~~ |
4 |
extern/ttconv/pprdrv_tt.cpp:261:42: error: cast from pointer to smaller type 'char' loses information |
5 |
font->FamilyName[length]=(char)NULL; |
6 |
^~~~~~~~~~ |
7 |
extern/ttconv/pprdrv_tt.cpp:277:37: error: cast from pointer to smaller type 'char' loses information |
8 |
font->Style[length]=(char)NULL; |
9 |
^~~~~~~~~~ |
10 |
extern/ttconv/pprdrv_tt.cpp:293:40: error: cast from pointer to smaller type 'char' loses information |
11 |
font->FullName[length]=(char)NULL; |
12 |
^~~~~~~~~~ |
13 |
extern/ttconv/pprdrv_tt.cpp:309:39: error: cast from pointer to smaller type 'char' loses information |
14 |
font->Version[length]=(char)NULL; |
15 |
^~~~~~~~~~ |
16 |
extern/ttconv/pprdrv_tt.cpp:325:40: error: cast from pointer to smaller type 'char' loses information |
17 |
font->PostName[length]=(char)NULL; |
18 |
^~~~~~~~~~ |
19 |
extern/ttconv/pprdrv_tt.cpp:340:42: error: cast from pointer to smaller type 'char' loses information |
20 |
font->PostName[length/2]=(char)NULL; |
21 |
^~~~~~~~~~ |
22 |
extern/ttconv/pprdrv_tt.cpp:355:41: error: cast from pointer to smaller type 'char' loses information |
23 |
font->Trademark[length]=(char)NULL; |
24 |
^~~~~~~~~~ |
25 |
extern/ttconv/pprdrv_tt.cpp:1041:19: error: cast from pointer to smaller type 'char' loses information |
26 |
temp[len]=(char)NULL; /* a buffer and make it ASCIIz. */ |
27 |
^~~~~~~~~~ |
28 |
|
29 |
--- extern/ttconv/pprdrv_tt.cpp.orig 2016-09-09 02:50:50 UTC |
30 |
+++ extern/ttconv/pprdrv_tt.cpp |
31 |
@@ -242,7 +242,7 @@ void Read_name(struct TTFONT *font) |
32 |
{ |
33 |
font->Copyright = (char*)calloc(sizeof(char),length+1); |
34 |
strncpy(font->Copyright,(const char*)strings+offset,length); |
35 |
- font->Copyright[length]=(char)NULL; |
36 |
+ font->Copyright[length]='\0'; |
37 |
replace_newlines_with_spaces(font->Copyright); |
38 |
|
39 |
#ifdef DEBUG_TRUETYPE |
40 |
@@ -258,7 +258,7 @@ void Read_name(struct TTFONT *font) |
41 |
free(font->FamilyName); |
42 |
font->FamilyName = (char*)calloc(sizeof(char),length+1); |
43 |
strncpy(font->FamilyName,(const char*)strings+offset,length); |
44 |
- font->FamilyName[length]=(char)NULL; |
45 |
+ font->FamilyName[length]='\0'; |
46 |
replace_newlines_with_spaces(font->FamilyName); |
47 |
|
48 |
#ifdef DEBUG_TRUETYPE |
49 |
@@ -274,7 +274,7 @@ void Read_name(struct TTFONT *font) |
50 |
free(font->Style); |
51 |
font->Style = (char*)calloc(sizeof(char),length+1); |
52 |
strncpy(font->Style,(const char*)strings+offset,length); |
53 |
- font->Style[length]=(char)NULL; |
54 |
+ font->Style[length]='\0'; |
55 |
replace_newlines_with_spaces(font->Style); |
56 |
|
57 |
#ifdef DEBUG_TRUETYPE |
58 |
@@ -290,7 +290,7 @@ void Read_name(struct TTFONT *font) |
59 |
free(font->FullName); |
60 |
font->FullName = (char*)calloc(sizeof(char),length+1); |
61 |
strncpy(font->FullName,(const char*)strings+offset,length); |
62 |
- font->FullName[length]=(char)NULL; |
63 |
+ font->FullName[length]='\0'; |
64 |
replace_newlines_with_spaces(font->FullName); |
65 |
|
66 |
#ifdef DEBUG_TRUETYPE |
67 |
@@ -306,7 +306,7 @@ void Read_name(struct TTFONT *font) |
68 |
free(font->Version); |
69 |
font->Version = (char*)calloc(sizeof(char),length+1); |
70 |
strncpy(font->Version,(const char*)strings+offset,length); |
71 |
- font->Version[length]=(char)NULL; |
72 |
+ font->Version[length]='\0'; |
73 |
replace_newlines_with_spaces(font->Version); |
74 |
|
75 |
#ifdef DEBUG_TRUETYPE |
76 |
@@ -322,7 +322,7 @@ void Read_name(struct TTFONT *font) |
77 |
free(font->PostName); |
78 |
font->PostName = (char*)calloc(sizeof(char),length+1); |
79 |
strncpy(font->PostName,(const char*)strings+offset,length); |
80 |
- font->PostName[length]=(char)NULL; |
81 |
+ font->PostName[length]='\0'; |
82 |
replace_newlines_with_spaces(font->PostName); |
83 |
|
84 |
#ifdef DEBUG_TRUETYPE |
85 |
@@ -337,7 +337,7 @@ void Read_name(struct TTFONT *font) |
86 |
free(font->PostName); |
87 |
font->PostName = (char*)calloc(sizeof(char),length+1); |
88 |
utf16be_to_ascii(font->PostName, (char *)strings+offset, length); |
89 |
- font->PostName[length/2]=(char)NULL; |
90 |
+ font->PostName[length/2]='\0'; |
91 |
replace_newlines_with_spaces(font->PostName); |
92 |
|
93 |
#ifdef DEBUG_TRUETYPE |
94 |
@@ -352,7 +352,7 @@ void Read_name(struct TTFONT *font) |
95 |
{ |
96 |
font->Trademark = (char*)calloc(sizeof(char),length+1); |
97 |
strncpy(font->Trademark,(const char*)strings+offset,length); |
98 |
- font->Trademark[length]=(char)NULL; |
99 |
+ font->Trademark[length]='\0'; |
100 |
replace_newlines_with_spaces(font->Trademark); |
101 |
|
102 |
#ifdef DEBUG_TRUETYPE |
103 |
@@ -1038,7 +1038,7 @@ const char *ttfont_CharStrings_getname(struct TTFONT * |
104 |
} |
105 |
|
106 |
strncpy(temp,ptr,len); /* Copy the pascal string into */ |
107 |
- temp[len]=(char)NULL; /* a buffer and make it ASCIIz. */ |
108 |
+ temp[len]='\0'; /* a buffer and make it ASCIIz. */ |
109 |
|
110 |
return temp; |
111 |
} |