Fossil SCM

Fix usage error message for 'ticket change' and 'ticket history' commands. Also, silence harmless compiler warnings.

mistachkin 2012-11-22 00:12 trunk
Commit fc5a217602a97cdcf150a39067fae10c6a77ea33
2 files changed +3 -3 +1 -1
+3 -3
--- src/th_main.c
+++ src/th_main.c
@@ -547,12 +547,12 @@
547547
int argc,
548548
const char **argv,
549549
int *argl
550550
){
551551
int n;
552
- char aRand[50];
553
- char zOut[100];
552
+ unsigned char aRand[50];
553
+ unsigned char zOut[100];
554554
if( argc!=1 && argc!=2 ){
555555
return Th_WrongNumArgs(interp, "repository ?BOOLEAN?");
556556
}
557557
if( argc==2 ){
558558
if( Th_ToInt(interp, argv[1], argl[1], &n) ){
@@ -563,11 +563,11 @@
563563
}else{
564564
n = 10;
565565
}
566566
sqlite3_randomness(n, aRand);
567567
encode16(aRand, zOut, n);
568
- Th_SetResult(interp, zOut, -1);
568
+ Th_SetResult(interp, (const char *)zOut, -1);
569569
return TH_OK;
570570
}
571571
572572
573573
/*
574574
--- src/th_main.c
+++ src/th_main.c
@@ -547,12 +547,12 @@
547 int argc,
548 const char **argv,
549 int *argl
550 ){
551 int n;
552 char aRand[50];
553 char zOut[100];
554 if( argc!=1 && argc!=2 ){
555 return Th_WrongNumArgs(interp, "repository ?BOOLEAN?");
556 }
557 if( argc==2 ){
558 if( Th_ToInt(interp, argv[1], argl[1], &n) ){
@@ -563,11 +563,11 @@
563 }else{
564 n = 10;
565 }
566 sqlite3_randomness(n, aRand);
567 encode16(aRand, zOut, n);
568 Th_SetResult(interp, zOut, -1);
569 return TH_OK;
570 }
571
572
573 /*
574
--- src/th_main.c
+++ src/th_main.c
@@ -547,12 +547,12 @@
547 int argc,
548 const char **argv,
549 int *argl
550 ){
551 int n;
552 unsigned char aRand[50];
553 unsigned char zOut[100];
554 if( argc!=1 && argc!=2 ){
555 return Th_WrongNumArgs(interp, "repository ?BOOLEAN?");
556 }
557 if( argc==2 ){
558 if( Th_ToInt(interp, argv[1], argl[1], &n) ){
@@ -563,11 +563,11 @@
563 }else{
564 n = 10;
565 }
566 sqlite3_randomness(n, aRand);
567 encode16(aRand, zOut, n);
568 Th_SetResult(interp, (const char *)zOut, -1);
569 return TH_OK;
570 }
571
572
573 /*
574
+1 -1
--- src/tkt.c
+++ src/tkt.c
@@ -1012,11 +1012,11 @@
10121012
eCmd = history;
10131013
}else{
10141014
eCmd = set;
10151015
}
10161016
if( g.argc==3 ){
1017
- usage("set TICKETUUID");
1017
+ usage("set|change|history TICKETUUID");
10181018
}
10191019
zTktUuid = db_text(0,
10201020
"SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%s*'", g.argv[3]
10211021
);
10221022
if( !zTktUuid ){
10231023
--- src/tkt.c
+++ src/tkt.c
@@ -1012,11 +1012,11 @@
1012 eCmd = history;
1013 }else{
1014 eCmd = set;
1015 }
1016 if( g.argc==3 ){
1017 usage("set TICKETUUID");
1018 }
1019 zTktUuid = db_text(0,
1020 "SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%s*'", g.argv[3]
1021 );
1022 if( !zTktUuid ){
1023
--- src/tkt.c
+++ src/tkt.c
@@ -1012,11 +1012,11 @@
1012 eCmd = history;
1013 }else{
1014 eCmd = set;
1015 }
1016 if( g.argc==3 ){
1017 usage("set|change|history TICKETUUID");
1018 }
1019 zTktUuid = db_text(0,
1020 "SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%s*'", g.argv[3]
1021 );
1022 if( !zTktUuid ){
1023

Keyboard Shortcuts

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