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

Compilation warnings with Clang #11

Open
Cyan4973 opened this issue Jan 28, 2016 · 0 comments
Open

Compilation warnings with Clang #11

Cyan4973 opened this issue Jan 28, 2016 · 0 comments

Comments

@Cyan4973
Copy link

Clang generates conversion warnings on compiling current master branch for linux 64-bits :

divsufsort.c:219:48: error: implicit conversion loses integer precision: 'long' to 'saidx_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
            if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; }
                                           ~ ~~^~~~
divsufsort.c:243:26: error: implicit conversion loses integer precision: 'long' to 'saidx_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
        BUCKET_A(c2) = k - SA;
                     ~ ~~^~~~
divsufsort.c:283:48: error: implicit conversion loses integer precision: 'long' to 'saidx_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
            if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; }

(...)

sssort.c:267:12: error: implicit conversion loses integer precision: 'long' to 'saidx_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
  t = last - first;
    ~ ~~~~~^~~~~~~
sssort.c:322:38: error: implicit conversion loses integer precision: 'long' to 'saidx_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
  for(ssize = 0, limit = ss_ilg(last - first);;) {
                         ~~~~~~ ~~~~~^~~~~~~
sssort.c:333:56: error: implicit conversion loses integer precision: 'long' to 'saidx_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
    if(limit-- == 0) { ss_heapsort(Td, PA, first, last - first); }

(...)

trsort.c:171:12: error: implicit conversion loses integer precision: 'long' to 'saidx_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
  t = last - first;
    ~ ~~~~~^~~~~~~
trsort.c:253:15: error: implicit conversion loses integer precision: 'long' to 'saidx_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
    if((s = a - first) > (t = b - a)) { s = t; }
          ~ ~~^~~~~~~
trsort.c:253:33: error: implicit conversion loses integer precision: 'long' to 'saidx_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
    if((s = a - first) > (t = b - a)) { s = t; }

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

1 participant