Fossil

Check-in [03424a031b]
Login

Check-in [03424a031b]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fix -pedantic gcc warning: overflow in implicit constant conversion
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 03424a031b608276d9baea9a7714d9cf9adaed2e
User & Date: jan.nijtmans 2012-09-24 10:12:27.897
Context
2012-09-24
11:48
Fix typo in win32_fatal_error(). ... (check-in: 9301375f3e user: mistachkin tags: trunk)
10:12
fix -pedantic gcc warning: overflow in implicit constant conversion ... (check-in: 03424a031b user: jan.nijtmans tags: trunk)
09:03
modified fix for [c8c0b78c84], which no longer causes "Usage" printouts to use the full fossil path, even though the command line didn't use the full path ... (check-in: dacc694615 user: jan.nijtmans tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529

  blob_rewind(&file);
  while( (n = blob_line(&file, &line))>0 ){
    if( n<=1 ) continue;
    z = blob_buffer(&line);
    z[n-1] = 0;
    if (foundBom == -1) {
      static const char bom[] = { 0xEF, 0xBB, 0xBF };
      foundBom = memcmp(z, bom, 3)==0;
      if( foundBom ) {
        z += 3; n -= 3;
      }
    }
    if((n>1) && ('\r'==z[n-2])){
      if(n==2) continue /*empty line*/;







|







515
516
517
518
519
520
521
522
523
524
525
526
527
528
529

  blob_rewind(&file);
  while( (n = blob_line(&file, &line))>0 ){
    if( n<=1 ) continue;
    z = blob_buffer(&line);
    z[n-1] = 0;
    if (foundBom == -1) {
      static const unsigned char bom[] = { 0xEF, 0xBB, 0xBF };
      foundBom = memcmp(z, bom, 3)==0;
      if( foundBom ) {
        z += 3; n -= 3;
      }
    }
    if((n>1) && ('\r'==z[n-2])){
      if(n==2) continue /*empty line*/;
Changes to src/wikiformat.c.
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
}

/*
** Skip over the UTF-8 Byte-Order-Mark that some broken Windows
** tools add to the beginning of text files.
*/
char *skip_bom(char *z){
  static const char bom[] = { 0xEF, 0xBB, 0xBF };
  if( z && memcmp(z, bom, 3)==0 ) z += 3;
  return z;
}

/*
** Transform the text in the pIn blob.  Write the results
** into the pOut blob.  The pOut blob should already be







|







1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
}

/*
** Skip over the UTF-8 Byte-Order-Mark that some broken Windows
** tools add to the beginning of text files.
*/
char *skip_bom(char *z){
  static const unsigned char bom[] = { 0xEF, 0xBB, 0xBF };
  if( z && memcmp(z, bom, 3)==0 ) z += 3;
  return z;
}

/*
** Transform the text in the pIn blob.  Write the results
** into the pOut blob.  The pOut blob should already be