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
Several compiler warnings during build (make check
)
#1223
Comments
There's another compiler warning (with
mkdir -p ./python
cd ./python \
&& ( test -e rrdtoolmodule.c || ln -s /home/diederik/dev/github/rrdtool-1.x/bindings/python/rrdtoolmodule.c ) \
&& env \
ABS_TOP_SRCDIR=/home/diederik/dev/github/rrdtool-1.x \
ABS_TOP_BUILDDIR=/home/diederik/dev/github/rrdtool-1.x \
/usr/bin/python3 /home/diederik/dev/github/rrdtool-1.x/bindings/python/setup.py build_ext --rpath=/opt/rrdtool-1.8.0/lib \
&& env \
ABS_TOP_SRCDIR=/home/diederik/dev/github/rrdtool-1.x \
ABS_TOP_BUILDDIR=/home/diederik/dev/github/rrdtool-1.x \
/usr/bin/python3 /home/diederik/dev/github/rrdtool-1.x/bindings/python/setup.py build
running build_ext
building 'rrdtool' extension
creating build
creating build/temp.linux-x86_64-cpython-311
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/diederik/dev/github/rrdtool-1.x/src -I/home/diederik/dev/github/rrdtool-1.x/src -I/usr/include/python3.11 -c rrdtoolmodule.c -o build/temp.linux-x86_64-cpython-311/rrdtoolmodule.o
rrdtoolmodule.c: In function ‘convert_args’:
rrdtoolmodule.c:157:43: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
157 | (*rrdtool_argv)[++argv_count] = PyRRD_String_AS_STRING(o);
| ^
rrdtoolmodule.c:163:51: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
163 | (*rrdtool_argv)[++argv_count] = PyRRD_String_AS_STRING(lo);
| ^
rrdtoolmodule.c: In function ‘_rrdtool_fetch_cb_wrapper’:
rrdtoolmodule.c:35:47: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
35 | #define PyRRD_String_AS_STRING(x) PyUnicode_AsUTF8(x)
| ^~~~~~~~~~~~~~~~
rrdtoolmodule.c:1246:29: note: in expansion of macro ‘PyRRD_String_AS_STRING’
1246 | char *key_str = PyRRD_String_AS_STRING(key);
| ^~~~~~~~~~~~~~~~~~~~~~
rrdtoolmodule.c:35:47: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
35 | #define PyRRD_String_AS_STRING(x) PyUnicode_AsUTF8(x)
| ^~~~~~~~~~~~~~~~
rrdtoolmodule.c:1305:45: note: in expansion of macro ‘PyRRD_String_AS_STRING’
1305 | char *exc_str = PyRRD_String_AS_STRING(exc_value_str);
| ^~~~~~~~~~~~~~~~~~~~~~
creating build/lib.linux-x86_64-cpython-311
x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 build/temp.linux-x86_64-cpython-311/rrdtoolmodule.o -L/home/diederik/dev/github/rrdtool-1.x/src/.libs -L/usr/lib/x86_64-linux-gnu -Wl,--enable-new-dtags,-R/opt/rrdtool-1.8.0/lib -lrrd -o build/lib.linux-x86_64-cpython-311/rrdtool.cpython-311-x86_64-linux-gnu.so
running build
running build_ext
make[2]: Leaving directory '/home/diederik/dev/github/rrdtool-1.x/bindings'
make[1]: Leaving directory '/home/diederik/dev/github/rrdtool-1.x/bindings'
Making check in tests Maybe this one is unavoidable as it has to do with bindings, but figured I'd mention it anyway. I think there are other warning when doing a full(er) build, but I'll leave that for now as I'm focused on |
#1242 addresses all but truncation warnings |
hramrach
added a commit
to hramrach/rrdtool-1.x
that referenced
this issue
Jan 6, 2024
There are a number of places where rrdtool combines multiple PATH_MAX sized strings into one. PATH_MAX is a constant that tends to work in practice a lot of the time but may not reflect the real capabilities of the system in real time. In place of on-stack buffers of PATH_MAX size allocate memory dynamically. Initialize the pointers to NULL so they can be all freed unconditionally on exit. Fixes: oetiker#1223 Signed-off-by: Michal Suchanek <msuchanek@suse.de>
hramrach
added a commit
to hramrach/rrdtool-1.x
that referenced
this issue
Jan 6, 2024
There are a number of places where rrdtool combines multiple PATH_MAX sized strings into one. PATH_MAX is a constant that tends to work in practice a lot of the time but may not reflect the real capabilities of the system in real time. In place of on-stack buffers of PATH_MAX size allocate memory dynamically. Initialize the pointers to NULL so they can be all freed unconditionally on exit. Fixes: oetiker#1223 Signed-off-by: Michal Suchanek <msuchanek@suse.de>
hramrach
added a commit
to hramrach/rrdtool-1.x
that referenced
this issue
Jan 6, 2024
There are a number of places where rrdtool combines multiple PATH_MAX sized strings into one. PATH_MAX is a constant that tends to work in practice a lot of the time but may not reflect the real capabilities of the system in real time. In place of on-stack buffers of PATH_MAX size allocate memory dynamically. Initialize the pointers to NULL so they can be all freed unconditionally on exit. Fixes: oetiker#1223 Signed-off-by: Michal Suchanek <msuchanek@suse.de>
hramrach
added a commit
to hramrach/rrdtool-1.x
that referenced
this issue
Jan 7, 2024
There are a number of places where rrdtool combines multiple PATH_MAX sized strings into one. PATH_MAX is a constant that tends to work in practice a lot of the time but may not reflect the real capabilities of the system in real time. In place of on-stack buffers of PATH_MAX size allocate memory dynamically. Initialize the pointers to NULL so they can be all freed unconditionally on exit. Fixes: oetiker#1223 Signed-off-by: Michal Suchanek <msuchanek@suse.de>
hramrach
added a commit
to hramrach/rrdtool-1.x
that referenced
this issue
Jan 8, 2024
There are a number of places where rrdtool combines multiple PATH_MAX sized strings into one. PATH_MAX is a constant that tends to work in practice a lot of the time but may not reflect the real capabilities of the system in real time. In place of on-stack buffers of PATH_MAX size allocate memory dynamically. Initialize the pointers to NULL so they can be all freed unconditionally on exit. Fixes: oetiker#1223 Signed-off-by: Michal Suchanek <msuchanek@suse.de>
hramrach
added a commit
to hramrach/rrdtool-1.x
that referenced
this issue
Jan 8, 2024
There are a number of places where rrdtool combines multiple PATH_MAX sized strings into one. PATH_MAX is a constant that tends to work in practice a lot of the time but may not reflect the real capabilities of the system in real time. In place of on-stack buffers of PATH_MAX size allocate memory dynamically. Initialize the pointers to NULL so they can be all freed unconditionally on exit. Fixes: oetiker#1223 Signed-off-by: Michal Suchanek <msuchanek@suse.de>
oetiker
pushed a commit
that referenced
this issue
Jan 8, 2024
There are a number of places where rrdtool combines multiple PATH_MAX sized strings into one. PATH_MAX is a constant that tends to work in practice a lot of the time but may not reflect the real capabilities of the system in real time. In place of on-stack buffers of PATH_MAX size allocate memory dynamically. Initialize the pointers to NULL so they can be all freed unconditionally on exit. Fixes: #1223 Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When running
make check VERBOSE=1
(on amd64), I'm seeing several compiler warnings of the following categories:To Reproduce
./bootstrap
;./configure
make check VERBOSE=1
Expected behavior
A build output without compiler warnings.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: