Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Build fails in branch openocd-cubeide-r4 or tag openocd-cubeide-v1.8.0 or later [-Werror=maybe-uninitialized]

Open
#10 3 comments 0 reactions 1 assignee View on GitHub

@tarek-bochkati is already working on this.

Since Nov 2, 2022.

Assessment

This issue has not been assessed yet.

Description

Build fails in fresh docker build on branch openocd-cubeide-r4 or tag openocd-cubeide-v1.8.0 or later.
Tag openocd-cubeide-v1.7.0 and branch openocd-cubeide-r3 build fine.

Docker commands:

ARG VARIANT="focal"
FROM ubuntu:${VARIANT} AS openocd-builder

ARG OPENOCD_PATH=/opt/openocd-stm

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
    && apt-get -y install --no-install-recommends \
    build-essential \
    ca-certificates \
    git \
    # build tools for openocd
    libhidapi-dev \
    libusb-1.0-0-dev \
    libusb-dev \
    libtool \ 
    make \
    automake \
    autoconf \
    pkg-config \
    tclsh \
    telnet \
 && rm -rf /var/lib/apt/lists/*

RUN git clone --branch openocd-cubeide-r4 https://github.com/STMicroelectronics/OpenOCD.git ${OPENOCD_PATH} \
 && cd ${OPENOCD_PATH} \
 && ./bootstrap \
 && ./configure --enable-stlink \
 && make -j"$($(nproc) + 2)"

Full error message:

#6 67.64 /bin/bash ./libtool  --tag=CC   --mode=link gcc -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Wpointer-arith -Wundef -Wno-error=deprecated-declarations -Werror -g -O2   -o src/target/openrisc/libopenrisc.la  src/target/openrisc/or1k.lo src/target/openrisc/or1k_du_adv.lo src/target/openrisc/or1k_tap_mohor.lo src/target/openrisc/or1k_tap_vjtag.lo src/target/openrisc/or1k_tap_xilinx_bscan.lo src/target/openrisc/jsp_server.lo  -lutil -ldl
#6 67.71 In file included from ./src/helper/list.h:21,
#6 67.71                  from ./src/helper/binarybuffer.h:25,
#6 67.71                  from src/jtag/drivers/stlink_usb.c:37:
#6 67.71 src/jtag/drivers/stlink_usb.c: In function 'stlink_dap_op_queue_run_internal':
#6 67.71 mv -f src/target/.deps/libtarget_la-armv8_dpm.Tpo src/target/.deps/libtarget_la-armv8_dpm.Plo
#6 67.74 ./src/helper/types.h:194:9: error: 'misc_items' may be used uninitialized in this function [-Werror=maybe-uninitialized]
#6 67.74   194 |  buf[0] = (uint8_t) (val >> 0);
#6 67.74       |  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
#6 67.74 src/jtag/drivers/stlink_usb.c:4595:20: note: 'misc_items' was declared here
#6 67.74  4595 |  unsigned int cnt, misc_items;
#6 67.74       |                    ^~~~~~~~~~
Dominant language
C
Stars
202
Forks
57
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from STMicroelectronics/OpenOCD

All issues in STMicroelectronics/OpenOCD

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.