Package: meshlab / 1.3.2+dfsg1-4

narrowing-conversion.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Description: Fix narrowing conversion with GCC 6
 This patch fixes a FTBFS on architectures where
 char is unsigned by default.
Bug-Debian: https://bugs.debian.org/811634
Author: Graham Inggs <ginggs@debian.org>
Last-Update: 2016-11-17
--- a/vcglib/vcg/complex/algorithms/create/mc_lookup_table.h
+++ b/vcglib/vcg/complex/algorithms/create/mc_lookup_table.h
@@ -54,9 +54,9 @@
 			*   0          1        0          1
 			*/
 			//-----------------------------------------------------------------------------
-            static char Cases(unsigned char cubetype, unsigned char u)
+            static signed char Cases(unsigned char cubetype, unsigned char u)
 			{
-				static const char cases[256][2] = {
+				static const signed char cases[256][2] = {
 					/*   0:                          */  {  0, -1 },
 					/*   1: 0,                       */  {  1,  0 },
 					/*   2:    1,                    */  {  1,  1 },
@@ -417,9 +417,9 @@
 			* A minus sign means to invert the result of the test.
 			*/
 			//-----------------------------------------------------------------------------
-            static char Test3(unsigned char config)
+            static signed char Test3(unsigned char config)
 			{
-				static const char test3[24] = {
+				static const signed char test3[24] = {
 					/*   5: 0,    2,                 */    5,
 					/*  33: 0,             5,        */    1,
 					/* 129: 0,                   7,  */    4,
@@ -552,9 +552,9 @@
 			* A minus sign means to invert the result of the test.
 			*/
 			//-----------------------------------------------------------------------------
-            static char Test4(unsigned char config)
+            static signed char Test4(unsigned char config)
 			{
-				static const char test4[8] = {
+				static const signed char test4[8] = {
 					/*  65: 0,                6,     */   7,
 					/* 130:    1,                7,  */   7,
 					/*  20:       2,    4,           */   7,
@@ -710,9 +710,9 @@
 			* A minus sign means to invert the result of the test.
 			*/
 			//-----------------------------------------------------------------------------
-            static char Test6(unsigned char config, int u)
+            static signed char Test6(unsigned char config, int u)
 			{
-				static const char test6[48][3] = {
+				static const signed char test6[48][3] = {
 					/*  67: 0, 1,             6,     */  {  2,  7,  10  },
 					/* 131: 0, 1,                7,  */  {  4,  7,  11  },
 					/*  21: 0,    2,    4,           */  {  5,  7,   1  },
@@ -993,9 +993,9 @@
 			* A minus sign means to invert the result of the test.
 			*/
 			//-----------------------------------------------------------------------------
-            static char Test7(unsigned char config, int u)
+            static signed char Test7(unsigned char config, int u)
 			{
-				static const char test7[16][5] = {
+				static const signed char test7[16][5] = {
 					/*  37: 0,    2,       5,        */  {  1,  2,  5,  7,   1 },
 					/* 133: 0,    2,             7,  */  {  3,  4,  5,  7,   3 },
 					/* 161: 0,             5,    7,  */  {  4,  1,  6,  7,   4 },
@@ -1868,9 +1868,9 @@
 			*/
 			//-----------------------------------------------------------------------------
 			/* 13: sub configs */
-            static char Subconfig13(unsigned char config)
+            static signed char Subconfig13(unsigned char config)
 			{
-				static const char subconfig13[64] = {
+				static const signed char subconfig13[64] = {
 					/*  0: 0,0,0,0,0,0 */   0,
 					/*  1: 1,0,0,0,0,0 */   1,
 					/*  2: 0,1,0,0,0,0 */   2,
@@ -2287,9 +2287,9 @@
 			* the cube is not.
 			*/
 			//-----------------------------------------------------------------------------
-            static char CasesClassic(unsigned char u, unsigned char w)
+            static signed char CasesClassic(unsigned char u, unsigned char w)
 			{
-				static const char casesClassic[256][16] = {
+				static const signed char casesClassic[256][16] = {
 					/*   0:                          */  { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
 					/*   1: 0,                       */  {  0,  8,  3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
 					/*   2:    1,                    */  {  0,  1,  9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },