/ Check-in [e66cf040]
Login

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

Overview
Comment:Fix MSVC compiler warning in the spellfix module. Also, add an assert.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e66cf0401fab766f62c1d263dcb1efb67b2075a9
User & Date: mistachkin 2012-08-17 12:13:11
Context
2012-08-17
13:44
Clarify that the number-of-bytes parameter to sqlite3_bind_blob() must be non-negative. check-in: b1b01c4c user: drh tags: trunk
12:13
Fix MSVC compiler warning in the spellfix module. Also, add an assert. check-in: e66cf040 user: mistachkin tags: trunk
11:47
Skip defining some WAL specific things in the Win32 VFS code when compiling without WAL support. Also, fix an example command line in the MSVC makefile. check-in: 61b1ae12 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_spellfix.c.

859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
*/
static void updateCost(
  unsigned int *m,
  int i,
  int j,
  int iCost
){
  int b;
  if( iCost<10000 ){
    b = m[j] + iCost;
    if( b<m[i] ) m[i] = b;
  }
}

/* Compute the edit distance between two strings.
**
** If an error occurs, return a negative number which is the error code.







|

|







859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
*/
static void updateCost(
  unsigned int *m,
  int i,
  int j,
  int iCost
){
  assert( iCost>=0 );
  if( iCost<10000 ){
    unsigned int b = m[j] + iCost;
    if( b<m[i] ) m[i] = b;
  }
}

/* Compute the edit distance between two strings.
**
** If an error occurs, return a negative number which is the error code.