Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
5b8fcb53
Commit
5b8fcb53
authored
9 years ago
by
Kostyantyn Vorobyov
Committed by
Julien Signoles
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[RTL] Remove obsolete warning functionality from ADT-based models
parent
183e1b3e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/e-acsl/share/e-acsl/adt_models/e_acsl_mmodel.c
+13
-37
13 additions, 37 deletions
src/plugins/e-acsl/share/e-acsl/adt_models/e_acsl_mmodel.c
with
13 additions
and
37 deletions
src/plugins/e-acsl/share/e-acsl/adt_models/e_acsl_mmodel.c
+
13
−
37
View file @
5b8fcb53
...
...
@@ -30,35 +30,6 @@
#include
"e_acsl_assert.h"
#include
"e_acsl_printf.h"
// E-ACSL warnings {{{
#define WARNING 0 // Output a warning message to stderr
#define ERROR 1 // Treat warnings as errors and abort execution
#define IGNORE 2 // Ignore warnings
#ifndef E_ACSL_WARNING
#define E_ACSL_WARNING WARNING
#endif
static
int
warning_level
=
E_ACSL_WARNING
;
// Issue a warning to stderr or abort a program
// based on the current warning level
static
void
warning
(
const
char
*
message
)
{
if
(
warning_level
!=
IGNORE
)
{
eprintf
(
"warning: %s
\n
"
,
message
);
if
(
warning_level
==
ERROR
)
abort
();
}
}
// Shortcut for issuing a warning and returning from a function
#define return_warning(_cond,_msg) \
if(_cond) { \
warning(_msg); \
return; \
}
// }}}
size_t
__heap_size
=
0
;
/*unsigned cpt_store_block = 0;*/
...
...
@@ -236,12 +207,14 @@ void __initialize (void * ptr, size_t size) {
struct
_block
*
tmp
;
unsigned
i
;
return_warning
(
ptr
==
NULL
,
"initialize"
);
if
(
!
ptr
)
return
;
assert
(
size
>
0
);
tmp
=
__get_cont
(
ptr
);
return_warning
(
tmp
==
NULL
,
"initialize"
);
if
(
tmp
==
NULL
)
return
;
/* already fully initialized, do nothing */
if
(
tmp
->
init_cpt
==
tmp
->
size
)
return
;
...
...
@@ -271,10 +244,12 @@ void __initialize (void * ptr, size_t size) {
/* mark all bytes of ptr as initialized */
void
__full_init
(
void
*
ptr
)
{
struct
_block
*
tmp
;
return_warning
(
ptr
==
NULL
,
"full_init"
);
if
(
ptr
==
NULL
)
return
NULL
;
tmp
=
__get_exact
(
ptr
);
return_warning
(
tmp
==
NULL
,
"full_init"
);
if
(
tmp
==
NULL
)
return
;
if
(
tmp
->
init_ptr
!=
NULL
)
{
free
(
tmp
->
init_ptr
);
...
...
@@ -286,10 +261,11 @@ void __full_init (void * ptr) {
/* mark a block as litteral string */
void
__literal_string
(
void
*
ptr
)
{
struct
_block
*
tmp
;
return_warning
(
ptr
==
NULL
,
"literal_string"
);
tmp
=
__get_exact
(
ptr
);
return_warning
(
tmp
==
NULL
,
"literal_string"
);
if
(
ptr
==
NULL
)
return
;
struct
_block
*
tmp
=
__get_exact
(
ptr
);
if
(
temp
==
NULL
)
return
;
tmp
->
is_litteral_string
=
true
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment