seL4 / sel4runtime

A minimal runtime for seL4 applications.
Other
12 stars 28 forks source link

Remove unused local variable #1

Closed axel-h closed 5 years ago

axel-h commented 5 years ago

Remove unused local variable to avoid compiler warning

kent-mcleod commented 5 years ago

@ssrg-bamboo test

LukeMondy commented 5 years ago

@ssrg-bamboo test

ssrg-bamboo commented 5 years ago

Hello, I'm a bot! I'll bring this PR into Trustworthy Systems and run some tests

ssrg-bamboo commented 5 years ago

Test results for commit c34bb08c4b490e2c9e70a78715b8a260c6d6eade

Summary

Test name Result
Code Quality - Check licenses - sel4runtime - EXT-axel-h-axel-1 SUCCESSFUL
Code Quality - Style - sel4runtime - EXT-axel-h-axel-1 FAILED

Detailed failure logs

Project Stage Result summary
Code Quality - Style - sel4runtime - EXT-axel-h-axel-1 Style check on changed files 1 of 3 jobs failed

Job: style Build logs

22-Oct-2019 15:49:29    Build Code Quality - Style - sel4runtime - EXT-axel-h-axel-1 - style #1 (CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR-1) started building on agent A local agent 2
22-Oct-2019 15:49:29    I run on the Bamboo server!
22-Oct-2019 15:49:29    Build working directory is /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR
22-Oct-2019 15:49:29    Executing build Code Quality - Style - sel4runtime - EXT-axel-h-axel-1 - style #1 (CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR-1)
22-Oct-2019 15:49:29    Preparing artifact 'code' for use at /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR/. (location: .)
22-Oct-2019 15:49:29    Artifact 'code' prepared in 18.78 ms at /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR/./code.tar.gz
22-Oct-2019 15:49:29    Running pre-build action: VCS Version Collector
22-Oct-2019 15:49:29    Starting task 'Untar code' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
22-Oct-2019 15:49:29    + tar xf code.tar.gz --recursive-unlink
22-Oct-2019 15:49:29    Finished task 'Untar code' with result: Success
22-Oct-2019 15:49:29    Starting task 'Set permissions so Bamboo can cleanup' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
22-Oct-2019 15:49:29    + chmod -R o+rwx /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR
22-Oct-2019 15:49:29    Finished task 'Set permissions so Bamboo can cleanup' with result: Success
22-Oct-2019 15:49:29    Starting task 'Check style of changed files' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
22-Oct-2019 15:49:29    + cd sel4runtime
22-Oct-2019 15:49:29    + xargs -d '\n' /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR/seL4_tools/misc/style.sh
22-Oct-2019 15:49:29    ++ git merge-base c34bb08c4b490e2c9e70a78715b8a260c6d6eade master
22-Oct-2019 15:49:29    + git diff --name-only c34bb08c4b490e2c9e70a78715b8a260c6d6eade 4a086d3b2650b4804bf4ebed1e4df6e046181706
22-Oct-2019 15:49:29    Formatted  include/arch/riscv/sel4runtime/thread_arch.h
22-Oct-2019 15:49:29    + git diff --exit-code
22-Oct-2019 15:49:29    diff --git a/include/arch/riscv/sel4runtime/thread_arch.h b/include/arch/riscv/sel4runtime/thread_arch.h
22-Oct-2019 15:49:29    index d9ae06e..df19e92 100644
22-Oct-2019 15:49:29    --- a/include/arch/riscv/sel4runtime/thread_arch.h
22-Oct-2019 15:49:29    +++ b/include/arch/riscv/sel4runtime/thread_arch.h
22-Oct-2019 15:49:29    @@ -11,31 +11,35 @@
22-Oct-2019 15:49:29      */
22-Oct-2019 15:49:29     #include <stdint.h>
22-Oct-2019 15:49:29     
22-Oct-2019 15:49:29    -static inline uintptr_t sel4runtime_read_tp(void) {
22-Oct-2019 15:49:29    +static inline uintptr_t sel4runtime_read_tp(void)
22-Oct-2019 15:49:29    +{
22-Oct-2019 15:49:29     #ifdef __clang__
22-Oct-2019 15:49:29         uintptr_t reg;
22-Oct-2019 15:49:29    -    __asm__ __volatile__ ("or %0, tp, x0" : "=r" (reg) );
22-Oct-2019 15:49:29    +    __asm__ __volatile__("or %0, tp, x0" : "=r"(reg));
22-Oct-2019 15:49:29     #else
22-Oct-2019 15:49:29         register uintptr_t reg __asm__("tp");
22-Oct-2019 15:49:29     #endif
22-Oct-2019 15:49:29         return reg;
22-Oct-2019 15:49:29     }
22-Oct-2019 15:49:29     
22-Oct-2019 15:49:29    -static inline void sel4runtime_write_tp(uintptr_t reg) {
22-Oct-2019 15:49:29    -    __asm__ __volatile__ ("or tp, %0, x0" :: "r" (reg) );
22-Oct-2019 15:49:29    +static inline void sel4runtime_write_tp(uintptr_t reg)
22-Oct-2019 15:49:29    +{
22-Oct-2019 15:49:29    +    __asm__ __volatile__("or tp, %0, x0" :: "r"(reg));
22-Oct-2019 15:49:29     }
22-Oct-2019 15:49:29     
22-Oct-2019 15:49:29     /*
22-Oct-2019 15:49:29      * Obtain the value of the TLS base for the current thread.
22-Oct-2019 15:49:29      */
22-Oct-2019 15:49:29    -static inline uintptr_t sel4runtime_get_tls_base(void) {
22-Oct-2019 15:49:29    +static inline uintptr_t sel4runtime_get_tls_base(void)
22-Oct-2019 15:49:29    +{
22-Oct-2019 15:49:29         return sel4runtime_read_tp();
22-Oct-2019 15:49:29     }
22-Oct-2019 15:49:29     
22-Oct-2019 15:49:29     /*
22-Oct-2019 15:49:29      * Set the value of the TLS base for the current thread.
22-Oct-2019 15:49:29      */
22-Oct-2019 15:49:29    -static inline void sel4runtime_set_tls_base(uintptr_t tls_base) {
22-Oct-2019 15:49:29    +static inline void sel4runtime_set_tls_base(uintptr_t tls_base)
22-Oct-2019 15:49:29    +{
22-Oct-2019 15:49:29         sel4runtime_write_tp(tls_base);
22-Oct-2019 15:49:29     }
22-Oct-2019 15:49:29     
22-Oct-2019 15:49:29    Failing task since return code of [/var/atlassian/application-data/bamboo/temp/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR-1-ScriptBuildTask-7889622144251621413.sh] was 1 while expected 0
22-Oct-2019 15:49:29    Finished task 'Check style of changed files' with result: Failed
22-Oct-2019 15:49:29    Starting task 'Set permissions so Bamboo can cleanup' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
22-Oct-2019 15:49:29    + chmod -R o+rwx /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR
22-Oct-2019 15:49:30    Finished task 'Set permissions so Bamboo can cleanup' with result: Success
22-Oct-2019 15:49:30    Starting task 'Run astyle code insights' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
22-Oct-2019 15:49:30    + cd sel4runtime
22-Oct-2019 15:49:30    ++ echo ssh://git@bitbucket.ts.data61.csiro.au:7999/sel4proj/sel4runtime.git
22-Oct-2019 15:49:30    ++ cut -d/ -f4
22-Oct-2019 15:49:30    + bb_proj=sel4proj
22-Oct-2019 15:49:30    + /scripts/bb_code_insights/create_code_insights.sh astyle sel4proj sel4runtime
22-Oct-2019 15:49:30    ++ dirname /scripts/bb_code_insights/create_code_insights.sh
22-Oct-2019 15:49:30    + SCRIPT_DIR=/scripts/bb_code_insights
22-Oct-2019 15:49:30    + BBS_URL=https://bitbucket.ts.data61.csiro.au
22-Oct-2019 15:49:30    + BBS_PROJECT=sel4proj
22-Oct-2019 15:49:30    + BBS_REPO=sel4runtime
22-Oct-2019 15:49:30    + REPORT_TO_RUN=astyle
22-Oct-2019 15:49:30    ++ git rev-parse HEAD
22-Oct-2019 15:49:30    + COMMIT_ID=c34bb08c4b490e2c9e70a78715b8a260c6d6eade
22-Oct-2019 15:49:30    + REPORT_KEY=sel4runtime.astyle.report
22-Oct-2019 15:49:30    + set +x
22-Oct-2019 15:49:30    + report_file=astyle_report.json
22-Oct-2019 15:49:30    + annotations_file=astyle_annotations.json
22-Oct-2019 15:49:30    + rm -f astyle_report.json astyle_annotations.json
22-Oct-2019 15:49:30    + /scripts/bb_code_insights/astyle
22-Oct-2019 15:49:32    Reporting on these files:  ['include/arch/riscv/sel4runtime/thread_arch.h']
22-Oct-2019 15:49:32    + set +x
22-Oct-2019 15:49:32    + '[' -f astyle_report.json ']'
22-Oct-2019 15:49:32    + cat astyle_report.json
22-Oct-2019 15:49:32    + '[' -f astyle_annotations.json ']'
22-Oct-2019 15:49:32    + cat astyle_annotations.json
22-Oct-2019 15:49:32    {"data":[{"title":"Total number of files with incorrect style","value":1},{"title":"Total number of lines with incorrect style","value":6}],"createdDate":1571719772260,"key":"sel4runtime.astyle.report","title":"Code style"}{"title": "Code style", "data": [{"title": "Total number of files with incorrect style", "value": 1}, {"title": "Total number of lines with incorrect style", "value": 6}]}{"annotations": [{"path": "include/arch/riscv/sel4runtime/thread_arch.h", "line": 14, "message": "There are 1 line(s) of incorrect style here.", "severity": "HIGH"}, {"path": "include/arch/riscv/sel4runtime/thread_arch.h", "line": 17, "message": "There are 1 line(s) of incorrect style here.", "severity": "HIGH"}, {"path": "include/arch/riscv/sel4runtime/thread_arch.h", "line": 24, "message": "There are 2 line(s) of incorrect style here.", "severity": "HIGH"}, {"path": "include/arch/riscv/sel4runtime/thread_arch.h", "line": 31, "message": "There are 1 line(s) of incorrect style here.", "severity": "HIGH"}, {"path": "include/arch/riscv/sel4runtime/thread_arch.h", "line": 38, "message": "There are 1 line(s) of incorrect style here.", "severity": "HIGH"}]}
22-Oct-2019 15:49:32    Finished task 'Run astyle code insights' with result: Success
22-Oct-2019 15:49:32    Running post build plugin 'NCover Results Collector'
22-Oct-2019 15:49:32    Running post build plugin 'Artifact Copier'
22-Oct-2019 15:49:32    Running post build plugin 'npm Cache Cleanup'
22-Oct-2019 15:49:32    Running post build plugin 'Clover Results Collector'
22-Oct-2019 15:49:32    Running post build plugin 'Docker Container Cleanup'
22-Oct-2019 15:49:32    Successfully removed working directory at '/var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR'
22-Oct-2019 15:49:32    Finalising the build...
22-Oct-2019 15:49:32    Stopping timer.
22-Oct-2019 15:49:32    Build CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR-1 completed.
22-Oct-2019 15:49:32    Running on server: post build plugin 'NCover Results Collector'
22-Oct-2019 15:49:32    Running on server: post build plugin 'Build Hanging Detection Configuration'
22-Oct-2019 15:49:32    Running on server: post build plugin 'Clover Delta Calculator'
22-Oct-2019 15:49:32    Running on server: post build plugin 'Maven Dependencies Postprocessor'
22-Oct-2019 15:49:32    All post build plugins have finished
22-Oct-2019 15:49:32    Generating build results summary...
22-Oct-2019 15:49:32    Saving build results to disk...
22-Oct-2019 15:49:32    Logging substituted variables...
22-Oct-2019 15:49:32    Indexing build results...
22-Oct-2019 15:49:32    Finished building CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMESTYLEPR-1.

This is the most I can report on right now, sorry!

axel-h commented 5 years ago

@ssrg-bamboo test

LukeMondy commented 5 years ago

Hey @axel-h , we're trying out this new bot system, fixing some teething issues as we go (you may have noticed some deleted comments 😅 ).

Currently the bot is setup to only listen to people in our GitHub organisation, and ignore comments from people outside it. It might be good for us to notify people of such a policy though!

@ssrg-bamboo test

ssrg-bamboo commented 5 years ago

Hello, I'm a bot! I'll bring this PR into Trustworthy Systems and run some tests

ssrg-bamboo commented 5 years ago

Test results for commit 1e5b95348b14a79c53839376276e9d967d840a07

Summary

NOTE: some test results have been updated!

Test name Result
Code Quality - Check licenses - sel4runtime - EXT-axel-h-axel-1 SUCCESSFUL
Code Quality - Style - sel4runtime - EXT-axel-h-axel-1 FAILED

Detailed failure logs

Project Stage Result summary
Code Quality - Style - sel4runtime - EXT-axel-h-axel-1 Style check on changed files 1 of 3 jobs failed

Job: gitlint Build logs

23-Oct-2019 11:13:57    Build Code Quality - Style - sel4runtime - EXT-axel-h-axel-1 - gitlint #2 (CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR-2) started building on agent A local agent 2
23-Oct-2019 11:13:57    I run on the Bamboo server!
23-Oct-2019 11:13:57    Build working directory is /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR
23-Oct-2019 11:13:57    Executing build Code Quality - Style - sel4runtime - EXT-axel-h-axel-1 - gitlint #2 (CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR-2)
23-Oct-2019 11:13:57    Preparing artifact 'code' for use at /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR/. (location: .)
23-Oct-2019 11:13:57    Artifact 'code' prepared in 20.83 ms at /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR/./code.tar.gz
23-Oct-2019 11:13:57    Running pre-build action: VCS Version Collector
23-Oct-2019 11:13:57    Starting task 'Untar code' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
23-Oct-2019 11:13:57    + tar xf code.tar.gz --recursive-unlink
23-Oct-2019 11:13:57    Finished task 'Untar code' with result: Success
23-Oct-2019 11:13:57    Starting task 'Set permissions so Bamboo can cleanup' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
23-Oct-2019 11:13:57    + chmod -R o+rwx /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR
23-Oct-2019 11:13:57    Finished task 'Set permissions so Bamboo can cleanup' with result: Success
23-Oct-2019 11:13:57    Starting task 'Lint commit messages' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
23-Oct-2019 11:13:57    + cd sel4runtime
23-Oct-2019 11:13:57    + gitlint --commits master..1e5b95348b14a79c53839376276e9d967d840a07 --config /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR/seL4_tools/misc/.gitlint
23-Oct-2019 11:14:01    Commit 1e5b95348b:
23-Oct-2019 11:14:01    1: T1 Title exceeds max length (54>50): "Remove unused local variable to avoid compiler warning"
23-Oct-2019 11:14:01    Failing task since return code of [/var/atlassian/application-data/bamboo/temp/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR-2-ScriptBuildTask-3555283809656010338.sh] was 1 while expected 0
23-Oct-2019 11:14:01    Finished task 'Lint commit messages' with result: Failed
23-Oct-2019 11:14:01    Starting task 'Set permissions so Bamboo can cleanup' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
23-Oct-2019 11:14:01    + chmod -R o+rwx /var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR
23-Oct-2019 11:14:01    Finished task 'Set permissions so Bamboo can cleanup' with result: Success
23-Oct-2019 11:14:01    Running post build plugin 'NCover Results Collector'
23-Oct-2019 11:14:01    Running post build plugin 'Artifact Copier'
23-Oct-2019 11:14:01    Running post build plugin 'npm Cache Cleanup'
23-Oct-2019 11:14:01    Running post build plugin 'Clover Results Collector'
23-Oct-2019 11:14:01    Running post build plugin 'Docker Container Cleanup'
23-Oct-2019 11:14:01    Successfully removed working directory at '/var/atlassian/application-data/bamboo/xml-data/build-dir/151224373/CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR'
23-Oct-2019 11:14:01    Finalising the build...
23-Oct-2019 11:14:01    Stopping timer.
23-Oct-2019 11:14:01    Build CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR-2 completed.
23-Oct-2019 11:14:01    Running on server: post build plugin 'NCover Results Collector'
23-Oct-2019 11:14:01    Running on server: post build plugin 'Build Hanging Detection Configuration'
23-Oct-2019 11:14:01    Running on server: post build plugin 'Clover Delta Calculator'
23-Oct-2019 11:14:01    Running on server: post build plugin 'Maven Dependencies Postprocessor'
23-Oct-2019 11:14:01    All post build plugins have finished
23-Oct-2019 11:14:01    Generating build results summary...
23-Oct-2019 11:14:01    Saving build results to disk...
23-Oct-2019 11:14:01    Logging substituted variables...
23-Oct-2019 11:14:01    Indexing build results...
23-Oct-2019 11:14:01    Finished building CQ-SEL4RUNTIMESTYLE3-SEL4RUNTIMEGITLINTPR-2.

This is the most I can report on right now, sorry!

axel-h commented 5 years ago

@LukeMondy yes, would helper if the bot says that it does not accept the command.

So, shall I try again with a shorter commit message now?

LukeMondy commented 5 years ago

Yes please!

LukeMondy commented 5 years ago

@ssrg-bamboo test

ssrg-bamboo commented 5 years ago

Hello, I'm a bot! I'll bring this PR into Trustworthy Systems and run some tests

ssrg-bamboo commented 5 years ago

All the tests we ran have passed! Nice job!