aboutsummaryrefslogtreecommitdiff
path: root/jim-bio.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-08-12 11:59:35 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:49 +1000
commit996d95360266ca6d0d6ef5e1d589d55b8dbf8a58 (patch)
tree9e888871d785af6efb715d6c04b89f3d6551d2f8 /jim-bio.c
parent4eeb22d1eee2a3db6b852c785b8ce8de84ec6154 (diff)
downloadjimtcl-996d95360266ca6d0d6ef5e1d589d55b8dbf8a58.zip
jimtcl-996d95360266ca6d0d6ef5e1d589d55b8dbf8a58.tar.gz
jimtcl-996d95360266ca6d0d6ef5e1d589d55b8dbf8a58.tar.bz2
Minor compiler compatibility fixes and ref count fix
Don't mix declarations and code Don't try sizeof(long long) if we don't have it Object not freed on bad printf modifier in [format] Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-bio.c')
-rw-r--r--jim-bio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/jim-bio.c b/jim-bio.c
index c477116..044fc22 100644
--- a/jim-bio.c
+++ b/jim-bio.c
@@ -58,6 +58,7 @@ static int bio_cmd_read(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
int hex = 0;
int total = 0;
FILE *fh;
+ Jim_Obj *result;
if (Jim_CompareStringImmediate(interp, argv[0], "-hex")) {
hex++;
@@ -78,7 +79,7 @@ static int bio_cmd_read(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
return JIM_ERR;
}
- Jim_Obj *result = Jim_NewStringObj(interp, "", 0);
+ result = Jim_NewStringObj(interp, "", 0);
/* Read one char at a time */
while (len > 0) {