This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new e4e6aff  hw/drivers/bmp388: Fix compilation warning
e4e6aff is described below

commit e4e6aff103fcd9951248a1fda5cfeeb4edceb568
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Mon Dec 7 10:35:57 2020 +0100

    hw/drivers/bmp388: Fix compilation warning
    
    Compiler detects this:
    bmp388.c:3596:12: error: 'rc' may be used uninitialized in this function
    
    Fixed by initializing variable to 0.
---
 hw/drivers/sensors/bmp388/src/bmp388.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/drivers/sensors/bmp388/src/bmp388.c 
b/hw/drivers/sensors/bmp388/src/bmp388.c
index 4e244d6..75f062f 100644
--- a/hw/drivers/sensors/bmp388/src/bmp388.c
+++ b/hw/drivers/sensors/bmp388/src/bmp388.c
@@ -3375,7 +3375,7 @@ bmp388_hybrid_read(struct sensor *sensor,
                    void *read_arg,
                    uint32_t time_ms)
 {
-    int rc;
+    int rc = 0;
     struct bmp388 *bmp388;
     struct bmp388_cfg *cfg;
     os_time_t time_ticks;

Reply via email to