Fossil SCM

Fix uninitialized variable in the "fossil merge-info --tk" command.

drh 2024-12-04 13:42 trunk
Commit 3165e1bfb329c1528561fca8c2c8fa5f3b112c680d99c58d0313b4588682a00b
1 file changed +1 -1
+1 -1
--- src/merge.c
+++ src/merge.c
@@ -48,11 +48,11 @@
4848
blob_appendf(&script, "set filelist [list");
4949
if( g.argc==2 ){
5050
/* No files named on the command-line. Use every file mentioned
5151
** in the MERGESTAT table to generate the file list. */
5252
Stmt q;
53
- int cnt;
53
+ int cnt = 0;
5454
db_prepare(&q,
5555
"SELECT coalesce(fnr,fn), op FROM mergestat %s ORDER BY 1",
5656
bAll ? "" : "WHERE op IN ('MERGE','CONFLICT')" /*safe-for-%s*/
5757
);
5858
while( db_step(&q)==SQLITE_ROW ){
5959
--- src/merge.c
+++ src/merge.c
@@ -48,11 +48,11 @@
48 blob_appendf(&script, "set filelist [list");
49 if( g.argc==2 ){
50 /* No files named on the command-line. Use every file mentioned
51 ** in the MERGESTAT table to generate the file list. */
52 Stmt q;
53 int cnt;
54 db_prepare(&q,
55 "SELECT coalesce(fnr,fn), op FROM mergestat %s ORDER BY 1",
56 bAll ? "" : "WHERE op IN ('MERGE','CONFLICT')" /*safe-for-%s*/
57 );
58 while( db_step(&q)==SQLITE_ROW ){
59
--- src/merge.c
+++ src/merge.c
@@ -48,11 +48,11 @@
48 blob_appendf(&script, "set filelist [list");
49 if( g.argc==2 ){
50 /* No files named on the command-line. Use every file mentioned
51 ** in the MERGESTAT table to generate the file list. */
52 Stmt q;
53 int cnt = 0;
54 db_prepare(&q,
55 "SELECT coalesce(fnr,fn), op FROM mergestat %s ORDER BY 1",
56 bAll ? "" : "WHERE op IN ('MERGE','CONFLICT')" /*safe-for-%s*/
57 );
58 while( db_step(&q)==SQLITE_ROW ){
59

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button