Fossil SCM
Zeroed a pointer in its declaration to squish a warning from GCC 4.8.4 on Ubuntu 14.04 about use of a potentially uninitted pointer. I don't think it's actually possible for the current code to use the pointer in the window between its declaration and first use, but I think we can afford the extra machine instruction this will cost us. (I assume newer GCCs are smart enough to analyze this situation correctly, which is why the warning hasn't been squished earlier.)
Commit
892781cb23c0335fea36b45a28bb2436b3910d032c8a53427fa3d1942bd58a3f
Parent
ad4193315f363aa…
1 file changed
+1
-1
+1
-1
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -154,11 +154,11 @@ | ||
| 154 | 154 | ** completes, entries that have non-NULL pLeaf should not be |
| 155 | 155 | ** displayed. |
| 156 | 156 | */ |
| 157 | 157 | for(pEntry=pThread->pFirst; pEntry; pEntry=pEntry->pNext){ |
| 158 | 158 | if( pEntry->fprev ){ |
| 159 | - ForumEntry *pBase, *p; | |
| 159 | + ForumEntry *pBase = 0, *p; | |
| 160 | 160 | p = forumentry_backward(pEntry->pPrev, pEntry->fprev); |
| 161 | 161 | pEntry->pEdit = p; |
| 162 | 162 | while( p ){ |
| 163 | 163 | pBase = p; |
| 164 | 164 | p->pLeaf = pEntry; |
| 165 | 165 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -154,11 +154,11 @@ | |
| 154 | ** completes, entries that have non-NULL pLeaf should not be |
| 155 | ** displayed. |
| 156 | */ |
| 157 | for(pEntry=pThread->pFirst; pEntry; pEntry=pEntry->pNext){ |
| 158 | if( pEntry->fprev ){ |
| 159 | ForumEntry *pBase, *p; |
| 160 | p = forumentry_backward(pEntry->pPrev, pEntry->fprev); |
| 161 | pEntry->pEdit = p; |
| 162 | while( p ){ |
| 163 | pBase = p; |
| 164 | p->pLeaf = pEntry; |
| 165 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -154,11 +154,11 @@ | |
| 154 | ** completes, entries that have non-NULL pLeaf should not be |
| 155 | ** displayed. |
| 156 | */ |
| 157 | for(pEntry=pThread->pFirst; pEntry; pEntry=pEntry->pNext){ |
| 158 | if( pEntry->fprev ){ |
| 159 | ForumEntry *pBase = 0, *p; |
| 160 | p = forumentry_backward(pEntry->pPrev, pEntry->fprev); |
| 161 | pEntry->pEdit = p; |
| 162 | while( p ){ |
| 163 | pBase = p; |
| 164 | p->pLeaf = pEntry; |
| 165 |