X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/885824d34f6f6626fde2fb041801408cbaf1f6f1..4fab1d8aadad5dcf9d016c8f99655a7abab65845:/test/libs.expect diff --git a/test/libs.expect b/test/libs.expect index 76f7fc2..2d0a75c 100644 --- a/test/libs.expect +++ b/test/libs.expect @@ -6,6 +6,12 @@ libs.c: (in function leave) libs.c:20:9: Function exit expects arg 1 to be int gets char *: "hullo" libs.c:21:3: Unreachable code: exit(i) libs.c: (in function print) +libs.c:29:3: Format string parameter to fprintf is not a compile-time constant: + s +libs.c:30:3: Format string parameter to printf is not a compile-time constant: + s +libs.c:31:3: Format string parameter to fprintf is not a compile-time constant: + s libs.c:33:3: Assignment of int to char: c = fgetc(f) libs.c:34:3: Assignment of int to char: c = getc(f) libs.c: (in function main) @@ -28,7 +34,7 @@ libs.c:54:3: Return value (type [function (int) returns void]) ignored: libs.c:55:3: Return value (type [function (int) returns void]) ignored: signal(SIGHUP, l... -Finished LCLint checking --- 15 code errors found, as expected +Finished checking --- 18 code warnings, as expected libs.c: (in function compare2) libs.c:14:10: Observer storage returned without qualification: "ok" @@ -37,6 +43,12 @@ libs.c: (in function leave) libs.c:20:9: Function exit expects arg 1 to be int gets char *: "hullo" libs.c:21:3: Unreachable code: exit(i) libs.c: (in function print) +libs.c:29:3: Format string parameter to fprintf is not a compile-time constant: + s +libs.c:30:3: Format string parameter to printf is not a compile-time constant: + s +libs.c:31:3: Format string parameter to fprintf is not a compile-time constant: + s libs.c:33:3: Assignment of int to char: c = fgetc(f) libs.c:34:3: Assignment of int to char: c = getc(f) libs.c: (in function main) @@ -63,7 +75,7 @@ libs.c:54:3: Return value (type [function (int) returns void]) ignored: libs.c:55:3: Return value (type [function (int) returns void]) ignored: signal(SIGHUP, l... -Finished LCLint checking --- 19 code errors found, as expected +Finished checking --- 22 code warnings, as expected libs.c: (in function compare2) libs.c:14:10: Observer storage returned without qualification: "ok" @@ -72,8 +84,14 @@ libs.c: (in function leave) libs.c:20:9: Function exit expects arg 1 to be int gets char *: "hullo" libs.c:21:3: Unreachable code: exit(i) libs.c: (in function print) +libs.c:29:3: Format string parameter to fprintf is not a compile-time constant: + s libs.c:29:3: Undocumented modification of *f possible from call to fprintf: fprintf(f, s) +libs.c:30:3: Format string parameter to printf is not a compile-time constant: + s +libs.c:31:3: Format string parameter to fprintf is not a compile-time constant: + s libs.c:33:7: Undocumented modification of *f possible from call to fgetc: fgetc(f) libs.c:33:3: Assignment of int to char: c = fgetc(f) @@ -104,7 +122,7 @@ libs.c:54:3: Return value (type [function (int) returns void]) ignored: libs.c:55:3: Return value (type [function (int) returns void]) ignored: signal(SIGHUP, l... -Finished LCLint checking --- 22 code errors found, as expected +Finished checking --- 25 code warnings, as expected libs.c: (in function compare2) libs.c:14:10: Observer storage returned without qualification: "ok" @@ -113,14 +131,20 @@ libs.c: (in function leave) libs.c:20:9: Function exit expects arg 1 to be int gets char *: "hullo" libs.c:21:3: Unreachable code: exit(i) libs.c: (in function print) +libs.c:29:3: Format string parameter to fprintf is not a compile-time constant: + s libs.c:29:3: Undocumented modification of *f possible from call to fprintf: fprintf(f, s) libs.c:29:3: Return value (type int) ignored: fprintf(f, s) +libs.c:30:3: Format string parameter to printf is not a compile-time constant: + s libs.c:30:3: Called procedure printf may access global stdout libs.c:30:3: Undocumented modification of *stdout possible from call to printf: printf(s) libs.c:30:3: Return value (type int) ignored: printf(s) libs.c:31:12: Undocumented use of global stderr +libs.c:31:3: Format string parameter to fprintf is not a compile-time constant: + s libs.c:31:3: Undocumented modification of *stderr possible from call to fprintf: fprintf(stderr, s) libs.c:31:3: Return value (type int) ignored: fprintf(stderr, s) @@ -130,8 +154,11 @@ libs.c:33:7: Undocumented modification of *f possible from call to fgetc: libs.c:33:7: Undocumented modification of errno possible from call to fgetc: fgetc(f) libs.c:33:3: Assignment of int to char: c = fgetc(f) +libs.c:34:7: Called procedure getc may access global errno libs.c:34:7: Undocumented modification of *f possible from call to getc: getc(f) +libs.c:34:7: Undocumented modification of errno possible from call to getc: + getc(f) libs.c:34:3: Assignment of int to char: c = getc(f) libs.c: (in function main) libs.c:46:44: Function bsearch expects arg 4 to be size_t gets [function (int, @@ -169,4 +196,4 @@ libs.c:55:3: Undocumented modification of errno possible from call to signal: libs.c:55:3: Return value (type [function (int) returns void]) ignored: signal(SIGHUP, l... -Finished LCLint checking --- 39 code errors found, as expected +Finished checking --- 44 code warnings, as expected