Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
buildsupport
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
buildsupport
Commits
3e23c42b
Commit
3e23c42b
authored
Jun 06, 2018
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix code to get less warnings at build time
parent
5764cf6a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
29 deletions
+28
-29
c/ada_wrappers_backend.c
c/ada_wrappers_backend.c
+10
-10
c/build_c_glue.c
c/build_c_glue.c
+9
-7
c/build_gui_glue.c
c/build_gui_glue.c
+4
-7
c/build_rtds_glue.c
c/build_rtds_glue.c
+4
-4
c/practical_functions.c
c/practical_functions.c
+1
-1
No files found.
c/ada_wrappers_backend.c
View file @
3e23c42b
...
@@ -72,13 +72,13 @@ void ada_wrappers_preamble(FV * fv)
...
@@ -72,13 +72,13 @@ void ada_wrappers_preamble(FV * fv)
/* wrappers.adb top header */
/* wrappers.adb top header */
fprintf
(
adb
,
fprintf
(
adb
,
"-- This file was generated automatically: DO NOT MODIFY IT !
\n\n
"
);
"-- This file was generated automatically: DO NOT MODIFY IT !
\n\n
"
);
fprintf
(
adb
,
//
fprintf(adb,
"-- pragma Style_Checks (Off);
\n
"
//
"-- pragma Style_Checks (Off);\n"
"-- pragma Warnings (Off);
\n\n
"
//
"-- pragma Warnings (Off);\n\n"
"with PolyORB_HI_Generated.Activity,
\n
"
//
"with PolyORB_HI_Generated.Activity,\n"
" PolyORB_HI.Utils;
\n
"
//
" PolyORB_HI.Utils;\n"
"use PolyORB_HI_Generated.Activity,
\n
"
//
"use PolyORB_HI_Generated.Activity,\n"
" PolyORB_HI.Utils;
\n\n
"
);
//
" PolyORB_HI.Utils;\n\n");
fprintf
(
ads
,
"with Interfaces.C;
\n
"
);
fprintf
(
ads
,
"with Interfaces.C;
\n
"
);
...
@@ -158,7 +158,7 @@ void ada_wrappers_preamble(FV * fv)
...
@@ -158,7 +158,7 @@ void ada_wrappers_preamble(FV * fv)
fprintf
(
ads
,
"
\n
package %s_Wrappers is
\n\n
"
,
fv
->
name
);
fprintf
(
ads
,
"
\n
package %s_Wrappers is
\n\n
"
,
fv
->
name
);
// To debug backdoor-related misuse of the passive functions stack:
// To debug backdoor-related misuse of the passive functions stack:
fprintf
(
adb
,
"with PolyORB_HI.Output;
\n\n
"
);
//
fprintf(adb, "with PolyORB_HI.Output;\n\n");
fprintf
(
adb
,
"package body %s_Wrappers is
\n\n
"
,
fv
->
name
);
fprintf
(
adb
,
"package body %s_Wrappers is
\n\n
"
,
fv
->
name
);
...
@@ -308,7 +308,7 @@ void add_PI_to_ada_wrappers(Interface * i)
...
@@ -308,7 +308,7 @@ void add_PI_to_ada_wrappers(Interface * i)
" ------------------------------------------------------
\n
"
" ------------------------------------------------------
\n
"
" -- Provided Interface
\"
%s
\"\n
"
" -- Provided Interface
\"
%s
\"\n
"
" ------------------------------------------------------
\n
"
" ------------------------------------------------------
\n
"
" procedure %s (Entity : PolyORB_HI_Generated.Deployment.Entity_Type"
,
" procedure %s (
dummy_
Entity : PolyORB_HI_Generated.Deployment.Entity_Type"
,
i
->
name
,
i
->
name
,
i
->
name
);
i
->
name
);
...
@@ -327,7 +327,7 @@ void add_PI_to_ada_wrappers(Interface * i)
...
@@ -327,7 +327,7 @@ void add_PI_to_ada_wrappers(Interface * i)
" ------------------------------------------------------
\n
"
" ------------------------------------------------------
\n
"
" -- Asynchronous Provided Interface
\"
%s
\"\n
"
" -- Asynchronous Provided Interface
\"
%s
\"\n
"
" ------------------------------------------------------
\n
"
" ------------------------------------------------------
\n
"
" procedure %s (Entity : PolyORB_HI_Generated.Deployment.Entity_Type"
,
" procedure %s (
dummy_
Entity : PolyORB_HI_Generated.Deployment.Entity_Type"
,
i
->
name
,
i
->
name
,
i
->
name
);
i
->
name
);
...
...
c/build_c_glue.c
View file @
3e23c42b
...
@@ -46,6 +46,7 @@ void c_preamble(FV * fv)
...
@@ -46,6 +46,7 @@ void c_preamble(FV * fv)
" #include <stdio.h>
\n
"
" #include <stdio.h>
\n
"
"#else
\n
"
"#else
\n
"
" typedef unsigned size_t;
\n
"
" typedef unsigned size_t;
\n
"
" typedef int ssize_t;
\n
"
"#endif
\n\n
"
);
"#endif
\n\n
"
);
fprintf
(
vm_if_h
,
"#ifdef __cplusplus
\n
"
fprintf
(
vm_if_h
,
"#ifdef __cplusplus
\n
"
...
@@ -543,7 +544,7 @@ void add_RI_to_c_invoke_ri(Interface * i)
...
@@ -543,7 +544,7 @@ void add_RI_to_c_invoke_ri(Interface * i)
}
}
FOREACH
(
p
,
Parameter
,
i
->
in
,
{
FOREACH
(
p
,
Parameter
,
i
->
in
,
{
fprintf
(
invoke_ri
,
fprintf
(
invoke_ri
,
" static char IN_buf_%s[%sasn1Scc%s%s] = {0};
\n
size_t size_IN_buf_%s=0;
\n
"
,
" static char IN_buf_%s[%sasn1Scc%s%s] = {0};
\n
s
s
ize_t size_IN_buf_%s=0;
\n
"
,
p
->
name
,
p
->
name
,
(
native
==
p
->
encoding
)
?
"sizeof("
:
""
,
(
native
==
p
->
encoding
)
?
"sizeof("
:
""
,
p
->
type
,
p
->
type
,
...
@@ -685,12 +686,13 @@ void GLUE_C_InvokeRI(Interface * i)
...
@@ -685,12 +686,13 @@ void GLUE_C_InvokeRI(Interface * i)
/* Discard duplicate RI (with different synchronism) - keep only the sync one */
/* Discard duplicate RI (with different synchronism) - keep only the sync one */
if
(
asynch
==
i
->
synchronism
)
{
if
(
asynch
==
i
->
synchronism
)
{
FOREACH
(
interface
,
Interface
,
i
->
parent_fv
->
interfaces
,
{
FOREACH
(
interface
,
Interface
,
i
->
parent_fv
->
interfaces
,
{
if
(
RI
==
interface
->
direction
&&
if
(
RI
==
interface
->
direction
&&
!
strcmp
(
interface
->
name
,
i
->
name
)
&&
!
strcmp
(
interface
->
name
,
i
->
name
)
&&
synch
==
interface
->
synchronism
)
{
synch
==
interface
->
synchronism
)
return
;}
{
}
return
;
);
}
});
}
}
add_RI_to_c_invoke_ri
(
i
);
add_RI_to_c_invoke_ri
(
i
);
}
}
...
...
c/build_gui_glue.c
View file @
3e23c42b
...
@@ -369,9 +369,7 @@ void create_queues_initialization_function(FV *fv)
...
@@ -369,9 +369,7 @@ void create_queues_initialization_function(FV *fv)
//
//
fprintf
(
code_id
,
"void %s_startup(void)
\n
"
fprintf
(
code_id
,
"void %s_startup(void)
\n
"
"{
\n
"
"{
\n
"
" int res_RI = 0;
\n
"
" unsigned msgsize_max = 8192;
\n
"
" int res_PI = 0;
\n
"
" int msgsize_max = 8192;
\n
"
" FILE *f = fopen(
\"
/proc/sys/fs/mqueue/msgsize_max
\"
,
\"
r
\"
);
\n
"
" FILE *f = fopen(
\"
/proc/sys/fs/mqueue/msgsize_max
\"
,
\"
r
\"
);
\n
"
" fscanf(f,
\"
%%d
\"
, &msgsize_max);
\n\n
"
,
" fscanf(f,
\"
%%d
\"
, &msgsize_max);
\n\n
"
,
fv
->
name
);
fv
->
name
);
...
@@ -430,7 +428,7 @@ int create_maxelement_queue_size_compute_function_on_IF(T_RI_PI_NAME_LIST *
...
@@ -430,7 +428,7 @@ int create_maxelement_queue_size_compute_function_on_IF(T_RI_PI_NAME_LIST *
IF_TYPE_STRING
);
IF_TYPE_STRING
);
fprintf
(
code_id
,
"{
\n
"
);
fprintf
(
code_id
,
"{
\n
"
);
fprintf
(
code_id
,
fprintf
(
code_id
,
"
in
t MAX_SIZE = sizeof(int); // The minimum size of a message (id + functional data) is the size of the id alone !
\n\n
"
);
"
size_
t MAX_SIZE = sizeof(int); // The minimum size of a message (id + functional data) is the size of the id alone !
\n\n
"
);
//Initiate iterator on the linked list of IF provided
//Initiate iterator on the linked list of IF provided
iterator
=
IF_LIST
;
iterator
=
IF_LIST
;
...
@@ -506,11 +504,10 @@ void create_incomming_data_pooler(char *NODE_NAME)
...
@@ -506,11 +504,10 @@ void create_incomming_data_pooler(char *NODE_NAME)
fprintf
(
code_id
,
"{
\n
"
);
fprintf
(
code_id
,
"{
\n
"
);
//Creates necessary local varaiables
//Creates necessary local varaiables
fprintf
(
code_id
,
" int msgsz = 0;
\n
"
);
//
fprintf(code_id, " int msgsz = 0;\n");
fprintf
(
code_id
,
" unsigned int sender = 0;
\n
"
);
//
fprintf(code_id, " unsigned int sender = 0;\n");
fprintf
(
code_id
,
" struct mq_attr msgq_attr;
\n
"
);
fprintf
(
code_id
,
" struct mq_attr msgq_attr;
\n
"
);
fprintf
(
code_id
,
" char* msgcontent = NULL;
\n
"
);
fprintf
(
code_id
,
" char* msgcontent = NULL;
\n
"
);
fprintf
(
code_id
,
" int msg_cnt = 0;
\n
"
);
fprintf
(
code_id
,
" T_%s_RI_list message_recieved_type;
\n\n\n
"
,
fprintf
(
code_id
,
" T_%s_RI_list message_recieved_type;
\n\n\n
"
,
NODE_NAME
);
NODE_NAME
);
...
...
c/build_rtds_glue.c
View file @
3e23c42b
...
@@ -51,16 +51,16 @@ void rtds_glue_preamble(FV * fv)
...
@@ -51,16 +51,16 @@ void rtds_glue_preamble(FV * fv)
fv
->
name
);
fv
->
name
);
fprintf
(
glue_h
,
"#include
\"
%s_p_decl.h
\"\n\n
"
,
fv
->
name
);
fprintf
(
glue_h
,
"#include
\"
%s_p_decl.h
\"\n\n
"
,
fv
->
name
);
fprintf
(
glue_h
,
"static RTDS_Proc %s_instanceDescriptor;
\n
"
,
fv
->
name
);
/* Declare the SDL instance descriptor */
fprintf
(
glue_h
,
"static RTDS_GlobalProcessInfo %s_instanceContext;
\n
"
,
fv
->
name
);
/* Declare the SDL instance context */
fprintf
(
glue_h
,
"static RTDS_MessageHeader currentMessage;
\n\n
"
);
/* Declare the RTDS message header */
/* b. glue_.c preamble */
/* b. glue_.c preamble */
fprintf
(
glue_c
,
fprintf
(
glue_c
,
"/* This file was generated automatically: DO NOT MODIFY IT ! */
\n\n
"
);
"/* This file was generated automatically: DO NOT MODIFY IT ! */
\n\n
"
);
fprintf
(
glue_c
,
"#include
\"
glue_%s.h
\"\n\n
"
,
fv
->
name
);
fprintf
(
glue_c
,
"#include
\"
glue_%s.h
\"\n\n
"
,
fv
->
name
);
fprintf
(
glue_c
,
"static RTDS_Proc %s_instanceDescriptor;
\n
"
,
fv
->
name
);
/* Declare the SDL instance descriptor */
fprintf
(
glue_c
,
"static RTDS_GlobalProcessInfo %s_instanceContext;
\n
"
,
fv
->
name
);
/* Declare the SDL instance context */
fprintf
(
glue_c
,
"static RTDS_MessageHeader currentMessage;
\n\n
"
);
/* Declare the RTDS message header */
fprintf
(
glue_c
,
fprintf
(
glue_c
,
"RTDS_Proc* %s_instanceDescriptor_ptr = NULL;
\n
"
,
"RTDS_Proc* %s_instanceDescriptor_ptr = NULL;
\n
"
,
fv
->
name
);
fv
->
name
);
...
...
c/practical_functions.c
View file @
3e23c42b
...
@@ -1244,7 +1244,7 @@ void List_C_Params_And_Size(Parameter * p, FILE ** file)
...
@@ -1244,7 +1244,7 @@ void List_C_Params_And_Size(Parameter * p, FILE ** file)
comma
?
", "
:
""
,
comma
?
", "
:
""
,
(
param_in
==
p
->
param_direction
)
?
"IN"
:
"OUT"
,
(
param_in
==
p
->
param_direction
)
?
"IN"
:
"OUT"
,
p
->
name
,
p
->
name
,
(
param_in
==
p
->
param_direction
)
?
"size_IN"
:
"&size_OUT"
,
(
param_in
==
p
->
param_direction
)
?
"
(size_t)
size_IN"
:
"&size_OUT"
,
p
->
name
);
p
->
name
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment