From 92bc4f3a8368314058c0d2dcbbe283fbc156dd1d Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 22 Feb 2019 15:33:57 +0100 Subject: [PATCH] python3: remove uninitialized variable (build fix) This patch also prevents the dynamic loading of the rtc_drv when executed on Linux, which is needed because this version of the rtc_drv is a hybrid Linux/Genode program. --- run/python3.run | 11 ++++++----- src/app/python3/main.cc | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/run/python3.run b/run/python3.run index ff03b84..093c14e 100644 --- a/run/python3.run +++ b/run/python3.run @@ -30,7 +30,10 @@ build { # Generate config # -set config { +proc rtc_start_attr { } { + if {[have_spec linux]} { return {ld="no"} } else { return "" } } + +install_config { @@ -48,7 +51,7 @@ set config { - + @@ -103,10 +106,8 @@ print("Hello again") - -} +} -install_config $config # # Boot modules diff --git a/src/app/python3/main.cc b/src/app/python3/main.cc index 01a8512..55500f0 100644 --- a/src/app/python3/main.cc +++ b/src/app/python3/main.cc @@ -76,12 +76,8 @@ struct Python::Main Py_SetPath(wbuf); } - if (_config.xml().has_attribute("verbose")) { - bool verbose; - _config.xml().attribute("verbose").value(&verbose); - if (verbose) - Py_VerboseFlag = 1; - } + if (_config.xml().attribute_value("verbose", false)) + Py_VerboseFlag = 1; //don't need the 'site' module Py_NoSiteFlag = 1;