Fossil SCM
fix -pedantic gcc warning: overflow in implicit constant conversion
Commit
03424a031b608276d9baea9a7714d9cf9adaed2e
Parent
dacc6946157383d…
2 files changed
+1
-1
+1
-1
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -517,11 +517,11 @@ | ||
| 517 | 517 | while( (n = blob_line(&file, &line))>0 ){ |
| 518 | 518 | if( n<=1 ) continue; |
| 519 | 519 | z = blob_buffer(&line); |
| 520 | 520 | z[n-1] = 0; |
| 521 | 521 | if (foundBom == -1) { |
| 522 | - static const char bom[] = { 0xEF, 0xBB, 0xBF }; | |
| 522 | + static const unsigned char bom[] = { 0xEF, 0xBB, 0xBF }; | |
| 523 | 523 | foundBom = memcmp(z, bom, 3)==0; |
| 524 | 524 | if( foundBom ) { |
| 525 | 525 | z += 3; n -= 3; |
| 526 | 526 | } |
| 527 | 527 | } |
| 528 | 528 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -517,11 +517,11 @@ | |
| 517 | while( (n = blob_line(&file, &line))>0 ){ |
| 518 | if( n<=1 ) continue; |
| 519 | z = blob_buffer(&line); |
| 520 | z[n-1] = 0; |
| 521 | if (foundBom == -1) { |
| 522 | static const char bom[] = { 0xEF, 0xBB, 0xBF }; |
| 523 | foundBom = memcmp(z, bom, 3)==0; |
| 524 | if( foundBom ) { |
| 525 | z += 3; n -= 3; |
| 526 | } |
| 527 | } |
| 528 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -517,11 +517,11 @@ | |
| 517 | while( (n = blob_line(&file, &line))>0 ){ |
| 518 | if( n<=1 ) continue; |
| 519 | z = blob_buffer(&line); |
| 520 | z[n-1] = 0; |
| 521 | if (foundBom == -1) { |
| 522 | static const unsigned char bom[] = { 0xEF, 0xBB, 0xBF }; |
| 523 | foundBom = memcmp(z, bom, 3)==0; |
| 524 | if( foundBom ) { |
| 525 | z += 3; n -= 3; |
| 526 | } |
| 527 | } |
| 528 |
+1
-1
| --- src/wikiformat.c | ||
| +++ src/wikiformat.c | ||
| @@ -1491,11 +1491,11 @@ | ||
| 1491 | 1491 | /* |
| 1492 | 1492 | ** Skip over the UTF-8 Byte-Order-Mark that some broken Windows |
| 1493 | 1493 | ** tools add to the beginning of text files. |
| 1494 | 1494 | */ |
| 1495 | 1495 | char *skip_bom(char *z){ |
| 1496 | - static const char bom[] = { 0xEF, 0xBB, 0xBF }; | |
| 1496 | + static const unsigned char bom[] = { 0xEF, 0xBB, 0xBF }; | |
| 1497 | 1497 | if( z && memcmp(z, bom, 3)==0 ) z += 3; |
| 1498 | 1498 | return z; |
| 1499 | 1499 | } |
| 1500 | 1500 | |
| 1501 | 1501 | /* |
| 1502 | 1502 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -1491,11 +1491,11 @@ | |
| 1491 | /* |
| 1492 | ** Skip over the UTF-8 Byte-Order-Mark that some broken Windows |
| 1493 | ** tools add to the beginning of text files. |
| 1494 | */ |
| 1495 | char *skip_bom(char *z){ |
| 1496 | static const char bom[] = { 0xEF, 0xBB, 0xBF }; |
| 1497 | if( z && memcmp(z, bom, 3)==0 ) z += 3; |
| 1498 | return z; |
| 1499 | } |
| 1500 | |
| 1501 | /* |
| 1502 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -1491,11 +1491,11 @@ | |
| 1491 | /* |
| 1492 | ** Skip over the UTF-8 Byte-Order-Mark that some broken Windows |
| 1493 | ** tools add to the beginning of text files. |
| 1494 | */ |
| 1495 | char *skip_bom(char *z){ |
| 1496 | static const unsigned char bom[] = { 0xEF, 0xBB, 0xBF }; |
| 1497 | if( z && memcmp(z, bom, 3)==0 ) z += 3; |
| 1498 | return z; |
| 1499 | } |
| 1500 | |
| 1501 | /* |
| 1502 |