Skip to content

Compilation warnings #3

@alexpreynolds

Description

@alexpreynolds

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions