Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 3 years ago

Language

C++

Compiler

gcc 11.1.0

Options
Warnings
Don't Use Boost
C++17
-pedantic
Raw compiler options
DES.cpp

Author

anonymous

about 3 years ago

DES.h
DES.cpp

$ g++ prog.cc -Wall -Wextra -std=c++17 -pedantic DES.cpp
DES.cpp: In member function 'std::string DES::shiftbits(std::string, int, char)':
DES.cpp:18:38: warning: comparison of integer expressions of different signedness: 'std::size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   18 |             for(std::size_t i = 0; i < n;i++)   // then prints from 0 to n
      |                                    ~~^~~
DES.cpp:30:34: warning: comparison of integer expressions of different signedness: 'std::size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   30 |         for(std::size_t i = 0; i < diff; i++)
      |                                ~~^~~~~~
DES.cpp: In member function 'std::string DES::xOr(std::string, std::string)':
DES.cpp:45:5: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   45 |     else
      |     ^~~~
DES.cpp:48:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   48 |         for(int i = 0; i < bigest; i++)
      |         ^~~
DES.cpp: In member function 'std::string DES::expansion_ri(std::string, std::string)':
DES.cpp:60:43: warning: unused parameter 's1' [-Wunused-parameter]
   60 | std::string DES::expansion_ri(std::string s1, std::string input32bit)
      |                               ~~~~~~~~~~~~^~
DES.cpp: In function 'int bit_to_dec(std::string)':
DES.cpp:259:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  259 |     for(int i = 0; i < num.size(); i++)
      |                    ~~^~~~~~~~~~~~
BEFORE ENDING TO ENCRYPT
AFTER ENDING OF ENCRYPT
Exit Code:
0