Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d61258

Browse files
committed
C++: Clean up multiply defined functions.
1 parent c17ae3a commit 4d61258

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

cpp/ql/test/library-tests/dataflow/taint-tests/string.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ char *user_input() {
1414
return source();
1515
}
1616

17-
void sink(const char *s) {};
18-
void sink(const std::string &s) {};
17+
void sink(const char *s);
18+
void sink(const std::string &s);
1919
void sink(const char *filename, const char *mode);
20-
void sink(char) {}
20+
void sink(char);
2121

2222
void test_string()
2323
{

cpp/ql/test/library-tests/dataflow/taint-tests/stringstream.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ namespace ns_char
1010
char source();
1111
}
1212

13-
void sink(int i) {};
13+
void sink(int i);
1414

15-
void sink(const std::string &s) {};
15+
void sink(const std::string &s);
1616

1717
template<class charT>
18-
void sink(const std::basic_ostream<charT> &s) {};
18+
void sink(const std::basic_ostream<charT> &s);
1919

2020
template<class charT>
21-
void sink(const std::basic_istream<charT> &s) {};
21+
void sink(const std::basic_istream<charT> &s);
2222

2323
template<class charT>
24-
void sink(const std::basic_iostream<charT> &s) {};
24+
void sink(const std::basic_iostream<charT> &s);
2525

2626
void test_stringstream_string(int amount)
2727
{

0 commit comments

Comments
 (0)