Skip to content

help.c: In function ‘new_version_alert’ #74

@danie-dejager

Description

@danie-dejager

I get the following warning building from master on Rocky9:

cmake -B build -S . \
 -DCMAKE_BUILD_TYPE=Release \
 -DUSE_SSL=ON \
 -DUSE_TUI=ON \
 -DUSE_FFTW3=ON \
 -DCMAKE_C_FLAGS="-O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE" \
 -DCMAKE_CXX_FLAGS="-O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE" \
 -DCMAKE_EXE_LINKER_FLAGS="-Wl,-z,relro -Wl,-z,now -pie"
[ 94%] Building C object CMakeFiles/httping.dir/fft.c.o
/home/ddejager/projects/HTTPing/help.c: In function ‘new_version_alert’:
/home/ddejager/projects/HTTPing/help.c:23:17: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   23 |                 fgets(buffer, sizeof buffer, fh);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ddejager/projects/HTTPing/nc.c: In function ‘status_line’:
/home/ddejager/projects/HTTPing/nc.c:407:9: warning: ignoring return value of ‘vasprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  407 |         vasprintf(&line, fmt, ap);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/ddejager/projects/HTTPing/utils.c: In function ‘format_value’:
/home/ddejager/projects/HTTPing/utils.c:114:15: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  114 |         (void)asprintf(&out, "%*.*f%s", digits_sig, digits_nsig, value / div, mul);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[100%] Linking C executable httping

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions