Commit 89249dc7 authored by Andre Maroneze's avatar Andre Maroneze 💬
Browse files

sync with frama-c master

parent 1f94f3d5
...@@ -13,7 +13,7 @@ MACHDEP = x86_32 ...@@ -13,7 +13,7 @@ MACHDEP = x86_32
## Preprocessing flags (for -cpp-extra-args) ## Preprocessing flags (for -cpp-extra-args)
CPPFLAGS += \ CPPFLAGS += \
-includefc_stubs.h -D__FRAMAC__EVA \ -D__FRAMAC__EVA \
## General flags ## General flags
FCFLAGS += \ FCFLAGS += \
......
// Non-POSIX declarations
#define TIOCGWINSZ 0x5413
struct winsize {
unsigned short ws_row;
unsigned short ws_col;
unsigned short ws_xpixel;
unsigned short ws_ypixel;
};
...@@ -30,7 +30,7 @@ Initializer of _modbus_tcp_backend references _modbus_tcp_receive (at src/modbus ...@@ -30,7 +30,7 @@ Initializer of _modbus_tcp_backend references _modbus_tcp_receive (at src/modbus
Initializer of _modbus_tcp_backend references _modbus_tcp_flush (at src/modbus-tcp.c:753) Initializer of _modbus_tcp_backend references _modbus_tcp_flush (at src/modbus-tcp.c:753)
[metrics] Statements analyzed by Eva [metrics] Statements analyzed by Eva
-------------------------- --------------------------
1066 stmts in analyzed functions, 859 stmts analyzed (80.6%) 1068 stmts in analyzed functions, 861 stmts analyzed (80.6%)
_connect: 26 stmts out of 26 (100.0%) _connect: 26 stmts out of 26 (100.0%)
_error_print: 9 stmts out of 9 (100.0%) _error_print: 9 stmts out of 9 (100.0%)
_modbus_init_common: 9 stmts out of 9 (100.0%) _modbus_init_common: 9 stmts out of 9 (100.0%)
...@@ -44,7 +44,7 @@ _modbus_tcp_recv: 2 stmts out of 2 (100.0%) ...@@ -44,7 +44,7 @@ _modbus_tcp_recv: 2 stmts out of 2 (100.0%)
_modbus_tcp_select: 20 stmts out of 20 (100.0%) _modbus_tcp_select: 20 stmts out of 20 (100.0%)
_modbus_tcp_send: 2 stmts out of 2 (100.0%) _modbus_tcp_send: 2 stmts out of 2 (100.0%)
_modbus_tcp_send_msg_pre: 4 stmts out of 4 (100.0%) _modbus_tcp_send_msg_pre: 4 stmts out of 4 (100.0%)
_modbus_tcp_set_ipv4_options: 14 stmts out of 14 (100.0%) _modbus_tcp_set_ipv4_options: 16 stmts out of 16 (100.0%)
read_io_status: 40 stmts out of 40 (100.0%) read_io_status: 40 stmts out of 40 (100.0%)
main: 167 stmts out of 182 (91.8%) main: 167 stmts out of 182 (91.8%)
check_confirmation: 76 stmts out of 89 (85.4%) check_confirmation: 76 stmts out of 89 (85.4%)
......
...@@ -1988,6 +1988,8 @@ static int _modbus_tcp_set_ipv4_options(int s) ...@@ -1988,6 +1988,8 @@ static int _modbus_tcp_set_ipv4_options(int s)
__retres = -1; __retres = -1;
goto return_label; goto return_label;
} }
option = 1;
ioctl(s,0x5421,(void *)(& option)); /* __va_ioctl_ptr */
option = 0x10; option = 0x10;
rc = setsockopt(s,IPPROTO_IP,1,(void const *)(& option), rc = setsockopt(s,IPPROTO_IP,1,(void const *)(& option),
(unsigned int)sizeof(int)); (unsigned int)sizeof(int));
......
...@@ -107,15 +107,15 @@ Potential entry points (47) ...@@ -107,15 +107,15 @@ Potential entry points (47)
Global metrics Global metrics
============== ==============
Sloc = 2644 Sloc = 2646
Decision point = 472 Decision point = 472
Global variables = 8 Global variables = 8
If = 405 If = 405
Loop = 35 Loop = 35
Goto = 222 Goto = 222
Assignment = 1171 Assignment = 1172
Exit point = 112 Exit point = 112
Function = 113 Function = 113
Function call = 408 Function call = 409
Pointer dereferencing = 701 Pointer dereferencing = 701
Cyclomatic complexity = 584 Cyclomatic complexity = 584
...@@ -1994,6 +1994,8 @@ static int _modbus_tcp_set_ipv4_options(int s) ...@@ -1994,6 +1994,8 @@ static int _modbus_tcp_set_ipv4_options(int s)
__retres = -1; __retres = -1;
goto return_label; goto return_label;
} }
option = 1;
ioctl(s,0x5421,(void *)(& option)); /* __va_ioctl_ptr */
option = 0x10; option = 0x10;
rc = setsockopt(s,IPPROTO_IP,1,(void const *)(& option), rc = setsockopt(s,IPPROTO_IP,1,(void const *)(& option),
(unsigned int)sizeof(int)); (unsigned int)sizeof(int));
......
...@@ -104,15 +104,15 @@ Potential entry points (40) ...@@ -104,15 +104,15 @@ Potential entry points (40)
Global metrics Global metrics
============== ==============
Sloc = 2592 Sloc = 2594
Decision point = 469 Decision point = 469
Global variables = 31 Global variables = 31
If = 402 If = 402
Loop = 32 Loop = 32
Goto = 222 Goto = 222
Assignment = 1154 Assignment = 1155
Exit point = 112 Exit point = 112
Function = 113 Function = 113
Function call = 388 Function call = 389
Pointer dereferencing = 680 Pointer dereferencing = 680
Cyclomatic complexity = 581 Cyclomatic complexity = 581
...@@ -149,7 +149,6 @@ safeclib stpncpy_s.c 221 stpncpy_s mem_access Unknown \valid(filler) ...@@ -149,7 +149,6 @@ safeclib stpncpy_s.c 221 stpncpy_s mem_access Unknown \valid(filler)
safeclib stpncpy_s.c 260 stpncpy_s mem_access Unknown \valid(filler_0) safeclib stpncpy_s.c 260 stpncpy_s mem_access Unknown \valid(filler_0)
safeclib strcasestr_s.c 148 strcasestr_s initialization Unknown \initialized(dest_0) safeclib strcasestr_s.c 148 strcasestr_s initialization Unknown \initialized(dest_0)
safeclib strcasestr_s.c 153 strcasestr_s initialization Unknown \initialized(dest_0 + i) safeclib strcasestr_s.c 153 strcasestr_s initialization Unknown \initialized(dest_0 + i)
safeclib strcasestr_s.c 153 strcasestr_s mem_access Unknown \valid_read(dest_0 + i)
safeclib strcasestr_s.c 156 strcasestr_s precondition of toupper Unknown c_uchar_of_eof: (0 ≤ c ≤ 255) ∨ c ≡ -1 safeclib strcasestr_s.c 156 strcasestr_s precondition of toupper Unknown c_uchar_of_eof: (0 ≤ c ≤ 255) ∨ c ≡ -1
safeclib strcasestr_s.c 156 strcasestr_s initialization Unknown \initialized(src + i) safeclib strcasestr_s.c 156 strcasestr_s initialization Unknown \initialized(src + i)
safeclib strcasestr_s.c 156 strcasestr_s precondition of toupper Unknown c_uchar_of_eof: (0 ≤ c ≤ 255) ∨ c ≡ -1 safeclib strcasestr_s.c 156 strcasestr_s precondition of toupper Unknown c_uchar_of_eof: (0 ≤ c ≤ 255) ∨ c ≡ -1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment