pavlin-policar / openTSNE

Extensible, parallel implementations of t-SNE
https://opentsne.rtfd.io
BSD 3-Clause "New" or "Revised" License
1.44k stars 158 forks source link

warning: code will never be executed #166

Closed yurivict closed 3 years ago

yurivict commented 3 years ago
openTSNE/_tsne.cpp:3137:23: warning: code will never be executed [-Wunreachable-code]
        if ((1 == 0)) abort();
                      ^~~~~
openTSNE/_tsne.cpp:3137:14: note: silence by adding parentheses to mark code as explicitly dead
        if ((1 == 0)) abort();
             ^
             /* DISABLES CODE */ ( )
openTSNE/_tsne.cpp:4084:31: warning: code will never be executed [-Wunreachable-code]
                if ((1 == 0)) abort();
                              ^~~~~
openTSNE/_tsne.cpp:4084:22: note: silence by adding parentheses to mark code as explicitly dead
                if ((1 == 0)) abort();
                     ^
                     /* DISABLES CODE */ ( )
openTSNE/_tsne.cpp:4806:23: warning: code will never be executed [-Wunreachable-code]
        if ((1 == 0)) abort();
                      ^~~~~
openTSNE/_tsne.cpp:4806:14: note: silence by adding parentheses to mark code as explicitly dead
        if ((1 == 0)) abort();
             ^
             /* DISABLES CODE */ ( )
4 warnings generated.

ckang-10 OS: FreeBSD 12.2

pavlin-policar commented 3 years ago

Please refer to https://github.com/pavlin-policar/openTSNE/issues/161.

pavlin-policar commented 3 years ago

The only thing I can try here is to re-cythonize the code and hope that this will be fixed in future versions. There's really nothing I can do about the current releases.

And, from what I can tell, this particular chunk of code doesn't actually error, it just throws warnings.