Fossil SCM
Add an assert() in a block which cannot happen. It survives 'reconstruct', so we can probably remove the block, but leaving it around for a while seems prudent.
Commit
7d4af37f39acbdbe335203be809e5597d2d17fcaa584d595ae64eb7c9d8a9cbc
Parent
18151a86152e50e…
1 file changed
+1
+1
| --- src/content.c | ||
| +++ src/content.c | ||
| @@ -600,10 +600,11 @@ | ||
| 600 | 600 | ); |
| 601 | 601 | db_bind_blob(&s1, ":data", &cmpr); |
| 602 | 602 | db_exec(&s1); |
| 603 | 603 | rid = db_last_insert_rowid(); |
| 604 | 604 | if( !pBlob ){ |
| 605 | + assert(!"cannot happen: pBlob is always non-NULL"); | |
| 605 | 606 | db_multi_exec("INSERT OR IGNORE INTO phantom VALUES(%d)", rid); |
| 606 | 607 | } |
| 607 | 608 | } |
| 608 | 609 | if( g.markPrivate || isPrivate ){ |
| 609 | 610 | db_multi_exec("INSERT OR IGNORE INTO private VALUES(%d)", rid); |
| 610 | 611 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -600,10 +600,11 @@ | |
| 600 | ); |
| 601 | db_bind_blob(&s1, ":data", &cmpr); |
| 602 | db_exec(&s1); |
| 603 | rid = db_last_insert_rowid(); |
| 604 | if( !pBlob ){ |
| 605 | db_multi_exec("INSERT OR IGNORE INTO phantom VALUES(%d)", rid); |
| 606 | } |
| 607 | } |
| 608 | if( g.markPrivate || isPrivate ){ |
| 609 | db_multi_exec("INSERT OR IGNORE INTO private VALUES(%d)", rid); |
| 610 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -600,10 +600,11 @@ | |
| 600 | ); |
| 601 | db_bind_blob(&s1, ":data", &cmpr); |
| 602 | db_exec(&s1); |
| 603 | rid = db_last_insert_rowid(); |
| 604 | if( !pBlob ){ |
| 605 | assert(!"cannot happen: pBlob is always non-NULL"); |
| 606 | db_multi_exec("INSERT OR IGNORE INTO phantom VALUES(%d)", rid); |
| 607 | } |
| 608 | } |
| 609 | if( g.markPrivate || isPrivate ){ |
| 610 | db_multi_exec("INSERT OR IGNORE INTO private VALUES(%d)", rid); |
| 611 |