Fix MSVC compiler warnings

This commit is contained in:
Albrecht Schlosser 2021-12-05 21:00:15 +01:00
parent 7d26ee6ac2
commit cf58f7ae2b
2 changed files with 5 additions and 4 deletions

View File

@ -46,7 +46,8 @@
#include <FL/Fl.H>
#include "flstring.h"
#include <FL/fl_ask.H>
#include "Fl_Message.h" // intentionally "hidden" in src/...
#include "Fl_Message.h" // intentionally "hidden" in src/...
#include "FL/fl_string.h" // fl_strdup()
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
@ -510,7 +511,7 @@ void Fl_Message::message_title(const char *title) {
message_title_ = 0;
}
if (title)
message_title_ = strdup(title);
message_title_ = fl_strdup(title);
}
/** Sets the default title of the dialog window used in many common dialogs.
@ -534,7 +535,7 @@ void Fl_Message::message_title_default(const char *title) {
message_title_default_ = 0;
}
if (title)
message_title_default_ = strdup(title);
message_title_default_ = fl_strdup(title);
}
void Fl_Message::icon_label(const char *str) {

View File

@ -99,7 +99,7 @@ void Fl_String::alloc_buf(int size) {
}
void Fl_String::value(const char *str) {
value(str, str ? strlen(str) : 0);
value(str, str ? (int)strlen(str) : 0);
}
int Fl_String::slen() const {