Fix warnings in ADA example

This commit is contained in:
Christian Helmuth 2017-06-02 15:58:22 +02:00
parent 2a35d375fa
commit 5e1fb42b54
3 changed files with 6 additions and 7 deletions

View File

@ -30,7 +30,6 @@ grep_output {init -> test-ada}
unify_output {0x[0-9a-f]+} "UNIFIED"
compare_output_to {
[init -> test-ada] Warning: using legacy main function, please convert to 'Component::construct'
[init -> test-ada] add called with a=13, b=14, result at address UNIFIED
[init -> test-ada] print_int called with argument 27
}

View File

@ -13,8 +13,6 @@ procedure main is
result : Integer;
r : test_package.some_range_t;
--
-- Declarations of external C functions
--

View File

@ -6,6 +6,7 @@
/* Genode includes */
#include <base/log.h>
#include <base/component.h>
/**
* Declaration of the Ada main procedure
@ -21,14 +22,15 @@ extern "C" void __gnat_eh_personality()
}
/**
* C wrapper for the Ada main program
* Wrapper for the Ada main program
*
* This function is called by the '_main' startup code. It may be used to
* This function is called on Genode component startup. It may be used to
* initialize memory objects at fixed virtual addresses prior calling the Ada
* main program.
*/
extern "C" int main(int argc, char **argv)
void Component::construct(Genode::Env &env)
{
_ada_main();
return 0;
env.parent().exit(0);
}