Fixed implicit declarations and misc warnings.

This commit is contained in:
Vincent Richard 2021-01-11 22:34:59 +01:00
parent 817358854d
commit 13ca7fa6e5
10 changed files with 59 additions and 2 deletions

View File

@ -57,6 +57,12 @@ charset::charset(const char* name)
}
charset::charset(const charset& other)
: m_name(other.m_name) {
}
void charset::parseImpl(
const parsingContext& /* ctx */,
const string& buffer,

View File

@ -47,6 +47,7 @@ public:
charset();
charset(const string& name);
charset(const char* name); // to allow creation from vmime::charsets constants
charset(const charset& other);
public:

View File

@ -49,6 +49,15 @@ disposition::disposition(
}
disposition::disposition(const disposition& other)
: m_actionMode(other.m_actionMode),
m_sendingMode(other.m_sendingMode),
m_type(other.m_type),
m_modifiers(other.m_modifiers) {
}
shared_ptr <component> disposition::clone() const {
shared_ptr <disposition> disp = make_shared <disposition>();

View File

@ -47,6 +47,7 @@ public:
const string& type,
const string& modifier
);
disposition(const disposition& other);
shared_ptr <component> clone() const;

View File

@ -48,6 +48,13 @@ mediaType::mediaType(const string& type, const string& subType)
}
mediaType::mediaType(const mediaType& other)
: m_type(other.m_type),
m_subType(other.m_subType) {
}
void mediaType::parseImpl(
const parsingContext& /* ctx */,
const string& buffer,

View File

@ -41,6 +41,7 @@ public:
mediaType();
mediaType(const string& type);
mediaType(const string& type, const string& subType);
mediaType(const mediaType& other);
public:

View File

@ -294,6 +294,14 @@ SMTPResponse::responseLine::responseLine(
}
SMTPResponse::responseLine::responseLine(const responseLine& other)
: m_code(other.m_code),
m_text(other.m_text),
m_enhCode(other.m_enhCode) {
}
void SMTPResponse::responseLine::setCode(const int code) {
m_code = code;
@ -330,6 +338,15 @@ const string SMTPResponse::responseLine::getText() const {
}
SMTPResponse::responseLine& SMTPResponse::responseLine::operator=(const responseLine& other) {
m_code = other.m_code;
m_text = other.m_text;
m_enhCode = other.m_enhCode;
return *this;
}
// SMTPResponse::enhancedStatusCode
@ -350,6 +367,16 @@ SMTPResponse::enhancedStatusCode::enhancedStatusCode(const enhancedStatusCode& e
}
SMTPResponse::enhancedStatusCode& SMTPResponse::enhancedStatusCode::operator=(const enhancedStatusCode& other) {
klass = other.klass;
subject = other.subject;
detail = other.detail;
return *this;
}
std::ostream& operator<<(std::ostream& os, const SMTPResponse::enhancedStatusCode& code) {
os << code.klass << '.' << code.subject << '.' << code.detail;

View File

@ -65,6 +65,8 @@ public:
enhancedStatusCode();
enhancedStatusCode(const enhancedStatusCode& enhCode);
enhancedStatusCode& operator=(const enhancedStatusCode& other);
unsigned short klass; /**< Success/failure. */
unsigned short subject; /**< Source of anomaly. */
unsigned short detail; /**< Precise error condition. */
@ -76,6 +78,7 @@ public:
public:
responseLine(const int code, const string& text, const enhancedStatusCode& enhCode);
responseLine(const responseLine& other);
void setCode(const int code);
int getCode() const;
@ -86,6 +89,8 @@ public:
void setText(const string& text);
const string getText() const;
responseLine& operator=(const responseLine& other);
private:
int m_code;

View File

@ -76,7 +76,7 @@
struct AutoRegisterModule { \
AutoRegisterModule() { \
static const char* moduleName = getTestModuleNameFromSourceFile(__FILE__); \
static CppUnit::AutoRegisterSuite <VMIME_TEST_SUITE>(autoRegisterRegistry1); \
static CppUnit::AutoRegisterSuite <VMIME_TEST_SUITE> autoRegisterRegistry1; \
static CppUnit::AutoRegisterSuite <VMIME_TEST_SUITE>(autoRegisterRegistry2)(moduleName); \
registerTestModule(moduleName); \
} \

View File

@ -50,7 +50,7 @@ VMIME_TEST_SUITE_BEGIN(urlTest)
u = vmime::utility::url(str);
} catch (vmime::exceptions::malformed_url) {
} catch (vmime::exceptions::malformed_url&) {
return false;
}