Jim Tcl
Check-in [3bb8ebd082]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:jim-interp.c: fix compile warning with GCC 8.1.1

GCC complains about possible truncation from snprintf() jim-interp.c: In function ‘JimInterpCommand’: jim-interp.c:164:46: warning: ‘%ld’ directive output may be truncated writing between 1 and 20 bytes into a region of size 19 [-Wformat-truncation=] snprintf(buf, sizeof(buf), "interp.handle%ld", Jim_GetId(interp)); ^~~ jim-interp.c:164:32: note: directive argument in the range [-9223372036854775807, 9223372036854775807] snprintf(buf, sizeof(buf), "interp.handle%ld", Jim_GetId(interp)); ^~~~~~~~~~~~~~~~~~ jim-interp.c:164:5: note: ‘snprintf’ output between 15 and 34 bytes into a destination of size 32 snprintf(buf, sizeof(buf), "interp.handle%ld", Jim_GetId(interp)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3bb8ebd0825cb3062a397f0bbd5d202abe713e52
User & Date: borneo.antonio@gmail.com 2018-07-26 20:59:45
Context
2018-07-26
23:49
linenoise: Update for optimised delete char

Update to version: https://github.com/msteveb/linenoise/commit/174a404dfa323a17852414dfc70b36976eddf6f3

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: dc3451b724 user: steveb@workware.net.au tags: trunk

20:59
jim-interp.c: fix compile warning with GCC 8.1.1

GCC complains about possible truncation from snprintf() jim-interp.c: In function ‘JimInterpCommand’: jim-interp.c:164:46: warning: ‘%ld’ directive output may be truncated writing between 1 and 20 bytes into a region of size 19 [-Wformat-truncation=] snprintf(buf, sizeof(buf), "interp.handle%ld", Jim_GetId(interp)); ^~~ jim-interp.c:164:32: note: directive argument in the range [-9223372036854775807, 9223372036854775807] snprintf(buf, sizeof(buf), "interp.handle%ld", Jim_GetId(interp)); ^~~~~~~~~~~~~~~~~~ jim-interp.c:164:5: note: ‘snprintf’ output between 15 and 34 bytes into a destination of size 32 snprintf(buf, sizeof(buf), "interp.handle%ld", Jim_GetId(interp)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> check-in: 3bb8ebd082 user: borneo.antonio@gmail.com tags: trunk

2018-07-25
07:04
linenoise: Update for optimised insert

Update to version: https://github.com/msteveb/linenoise/commit/d7bcf93d4de7581e043283ab461eca2310dd8fdc

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: e8aebbb399 user: steveb@workware.net.au tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to jim-interp.c.

135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

/**
 * [interp] creates a new interpreter.
 */
static int JimInterpCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    Jim_Interp *child;
    char buf[32];

    if (argc != 1) {
        Jim_WrongNumArgs(interp, 1, argv, "");
        return JIM_ERR;
    }

    /* Create the interpreter command */







|







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

/**
 * [interp] creates a new interpreter.
 */
static int JimInterpCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    Jim_Interp *child;
    char buf[34];

    if (argc != 1) {
        Jim_WrongNumArgs(interp, 1, argv, "");
        return JIM_ERR;
    }

    /* Create the interpreter command */