X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dcf15a2f87c8964df192d059be802e3bb436c853..13fb4af932a02ea0bd4293d1e55ac071de326f80:/src/xbt/xbt_main.cpp diff --git a/src/xbt/xbt_main.cpp b/src/xbt/xbt_main.cpp index ce2bc71196..f4ba9ab2c8 100644 --- a/src/xbt/xbt_main.cpp +++ b/src/xbt/xbt_main.cpp @@ -47,8 +47,8 @@ int xbt_pagebits = 0; /* Declare xbt_preinit and xbt_postexit as constructor/destructor of the library. * This is crude and rather compiler-specific, unfortunately. */ -static void xbt_preinit(void) _XBT_GNUC_CONSTRUCTOR(200); -static void xbt_postexit(void); +static void xbt_preinit() _XBT_GNUC_CONSTRUCTOR(200); +static void xbt_postexit(); #ifdef _WIN32 #include @@ -75,7 +75,8 @@ static BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserv #endif -static void xbt_preinit(void) { +static void xbt_preinit() +{ unsigned int seed = 2147483647; #ifdef _WIN32 SYSTEM_INFO si; @@ -104,9 +105,9 @@ static void xbt_preinit(void) { atexit(xbt_postexit); } -static void xbt_postexit(void) +static void xbt_postexit() { - if (!_sg_do_clean_atexit) + if (not _sg_do_clean_atexit) return; xbt_initialized--; xbt_dict_postexit(); @@ -134,7 +135,7 @@ void xbt_init(int *argc, char **argv) xbt_cmdline = xbt_dynar_new(sizeof(char*), NULL); for (int i = 0; i < *argc; i++) xbt_dynar_push(xbt_cmdline,&(argv[i])); - + xbt_log_init(argc, argv); } @@ -152,11 +153,11 @@ void xbt_free_ref(void *d) } /** @brief Kill the program in silence */ -void xbt_abort(void) +void xbt_abort() { #ifdef COVERAGE /* Call __gcov_flush on abort when compiling with coverage options. */ - extern void __gcov_flush(void); + extern void __gcov_flush(); __gcov_flush(); #endif #ifdef _WIN32