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 #3

Open
alexpreynolds opened this issue Jul 8, 2014 · 0 comments
Open

Compilation warnings #3

alexpreynolds opened this issue Jul 8, 2014 · 0 comments

Comments

@alexpreynolds
Copy link
Contributor

I saw the following warnings compiling with LLVM 5.1. The first warning might be worth closer investigation, in the case of overflow. The others could probably be safely ignored.

Papillion:fastqz alexpreynolds$ make
g++ -O2 -msse2 -lpthread fastqz15.cpp libzpaq.cpp -o fastqz
fastqz15.cpp:560:32: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
          argv[4], collisions, ref.size()/8);
                               ^~~~~~~~~~~~
1 warning generated.
libzpaq.cpp:511:16: warning: assigning field to itself [-Wself-assign-field]
    case 64: a = a; break; // A=A
               ^
libzpaq.cpp:520:16: warning: assigning field to itself [-Wself-assign-field]
    case 73: b = b; break; // B=B
               ^
libzpaq.cpp:529:16: warning: assigning field to itself [-Wself-assign-field]
    case 82: c = c; break; // C=C
               ^
libzpaq.cpp:538:16: warning: assigning field to itself [-Wself-assign-field]
    case 91: d = d; break; // D=D
               ^
libzpaq.cpp:655:22: warning: self-comparison always evaluates to true [-Wtautological-compare]
    case 216: f = (a == a); break; // A==A
                     ^
libzpaq.cpp:663:22: warning: self-comparison always evaluates to false [-Wtautological-compare]
    case 224: f = (a < a); break; // A<A
                     ^
libzpaq.cpp:671:22: warning: self-comparison always evaluates to false [-Wtautological-compare]
    case 232: f = (a > a); break; // A>A
                     ^
7 warnings generated.
c++     fapack.cpp   -o fapack
c++     fapacks.cpp   -o fapacks
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