Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two more compiler nags on 'maybe-uninitialized' #2083

Closed
eddelbuettel opened this issue Jan 29, 2025 · 1 comment
Closed

Two more compiler nags on 'maybe-uninitialized' #2083

eddelbuettel opened this issue Jan 29, 2025 · 1 comment

Comments

@eddelbuettel
Copy link

Using Ubuntu 24.10 with gcc-14 and updating from CRAN I see

** libs
using C compiler: ‘gcc-14 (Ubuntu 14.2.0-4ubuntu2) 14.2.0’
make[1]: Entering directory '/usr/local/lib/R/site-library/00LOCK-renv/00new/renv/libs'
ccache gcc-14 -I"/usr/share/R/include" -DNDEBUG       -fpic  -O3 -Wall -pipe -pedantic -c renv.c -o renv.o
renv.c: In function ‘recurse’:
renv.c:329:9: warning: ‘symbol’ may be used uninitialized [-Wmaybe-uninitialized]
  329 |         Rf_defineVar(symbol, object, frame);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
renv.c:296:8: note: ‘symbol’ was declared here
  296 |   SEXP symbol, expr, frame = R_NilValue;
      |        ^~~~~~
renv.c:330:9: warning: ‘expr’ may be used uninitialized [-Wmaybe-uninitialized]
  330 |         Rf_eval(expr, frame);
      |         ^~~~~~~~~~~~~~~~~~~~
renv.c:296:16: note: ‘expr’ was declared here
  296 |   SEXP symbol, expr, frame = R_NilValue;
      |                ^~~~
ccache gcc-14 -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -o renv.so renv.o -L/usr/lib/R/lib -lR
make[1]: Leaving directory '/usr/local/lib/R/site-library/00LOCK-renv/00new/renv/libs'

I can send you the trivial PR if you want.

@kevinushey
Copy link
Collaborator

Thanks; just fixed that up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants