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

Clang-10 prints many warnings, some look damaging #201

Open
yurivict opened this issue Sep 27, 2020 · 0 comments
Open

Clang-10 prints many warnings, some look damaging #201

yurivict opened this issue Sep 27, 2020 · 0 comments
Labels

Comments

@yurivict
Copy link

/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/checksum.c:240:39: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
                *matches = (attr_size == expected_len || attr_size == expected_len + 1) &&
                            ~~~~~~~~~ ^  ~~~~~~~~~~~~
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/checksum.c:240:68: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
                *matches = (attr_size == expected_len || attr_size == expected_len + 1) &&
                                                         ~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~
2 warnings generated.
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/downloader.c:747:41: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
            } else if (mirrors_iterated < c_mirror->failed_transfers) {
                       ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/url_substitution.c:132:33: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Wsign-compare]
                    if (var_len == cur - varname && strncmp(var_val->var, varname, var_len) == 0) {
                        ~~~~~~~ ^  ~~~~~~~~~~~~~
1 warning generated.
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/yum.c:444:42: warning: unused parameter 'fd' [-Wunused-parameter]
                                     int fd,
                                         ^
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/yum.c:797:13: warning: variable 'fd' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (is_zchunk) {
            ^~~~~~~~~
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/yum.c:821:40: note: uninitialized use occurs here
                                       fd,
                                       ^~
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/yum.c:797:9: note: remove the 'if' if its condition is always false
        if (is_zchunk) {
        ^~~~~~~~~~~~~~~~
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/yum.c:755:15: note: initialize the variable 'fd' to silence this warning
        int fd;
              ^
               = 0
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/yum.c:1033:9: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    if (is_zchunk) {
        ^~~~~~~~~
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/yum.c:1062:12: note: uninitialized use occurs here
    assert(ret || tmp_err);
           ^~~
/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e)       ((e) ? (void)0 : __assert(__func__, __FILE__, \
                          ^
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/yum.c:1033:5: note: remove the 'if' if its condition is always false
    if (is_zchunk) {
    ^~~~~~~~~~~~~~~~
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/yum.c:987:17: note: initialize the variable 'ret' to silence this warning
    gboolean ret, matches;
                ^
                 = 0
3 warnings generated.
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/python/handle-py.c:1189:12: warning: missing field 'ml_meth' initializer [-Wmissing-field-initializers]
    { NULL }
           ^
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/python/handle-py.c:1233:1: warning: missing field 'tp_bases' initializer [-Wmissing-field-initializers]
};
^
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/python/metadatatarget-py.c:429:12: warning: missing field 'ml_meth' initializer [-Wmissing-field-initializers]
    { NULL }
           ^
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/python/metadatatarget-py.c:473:1: warning: missing field 'tp_bases' initializer [-Wmissing-field-initializers]
};
^
2 warnings generated.
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/python/result-py.c:211:12: warning: missing field 'ml_meth' initializer [-Wmissing-field-initializers]
    { NULL }
           ^
/usr/ports/misc/librepo/work/librepo-1.12.1/librepo/python/result-py.c:255:1: warning: missing field 'tp_bases' initializer [-Wmissing-field-initializers]
};
^
2 warnings generated.
@dmach dmach added the dnf5 label Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants