Fossil

Check-in [d891af83]
Login

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

Overview
Comment:Fix a harmless compiler warning in an assert() in delta.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d891af8385a4d4c0c935f167c52bd17e8ccaf85a
User & Date: drh 2015-12-31 16:10:08
Context
2016-01-02
10:34
Create new branch named "technoteattachcli" check-in: 5712fa8f user: dave.vines tags: technoteattachcli(unpublished)
2016-01-01
17:30
Update the built-in SQLite to the second beta for 3.10.0. check-in: 987a80ef user: drh tags: trunk
2015-12-31
16:10
Fix a harmless compiler warning in an assert() in delta.c. check-in: d891af83 user: drh tags: trunk
16:06
Add the ability to have attachments on technotes. Add command-line support for technotes in the "fossil wiki" command. check-in: 045deb27 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/delta.c.

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
** of four bytes.
*/
static unsigned int checksum(const char *zIn, size_t N){
  static const int byteOrderTest = 1;
  const unsigned char *z = (const unsigned char *)zIn;
  const unsigned char *zEnd = (const unsigned char*)&zIn[N&~3];
  unsigned sum = 0;
  assert( (3&(sqlite3_uint64)z)==0 );  /* Four-byte alignment */
  if( 0==*(char*)&byteOrderTest ){
    /* This is a big-endian machine */
    while( z<zEnd ){
      sum += *(unsigned*)z;
      z += 4;
    }
  }else{







|







224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
** of four bytes.
*/
static unsigned int checksum(const char *zIn, size_t N){
  static const int byteOrderTest = 1;
  const unsigned char *z = (const unsigned char *)zIn;
  const unsigned char *zEnd = (const unsigned char*)&zIn[N&~3];
  unsigned sum = 0;
  assert( (z - (const unsigned char*)0)%4==0 );  /* Four-byte alignment */
  if( 0==*(char*)&byteOrderTest ){
    /* This is a big-endian machine */
    while( z<zEnd ){
      sum += *(unsigned*)z;
      z += 4;
    }
  }else{