mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 11:25:22 +08:00
Fixing a couple of warnings.
This commit is contained in:
@@ -365,7 +365,7 @@ void shell_pipe_cb(FL_SOCKET, void*) {
|
|||||||
static void expand_macro(std::string &cmd, const std::string ¯o, const std::string &content) {
|
static void expand_macro(std::string &cmd, const std::string ¯o, const std::string &content) {
|
||||||
for (int i=0;;) {
|
for (int i=0;;) {
|
||||||
i = cmd.find(macro, i);
|
i = cmd.find(macro, i);
|
||||||
if (i==std::string::npos) break;
|
if (i==(int)std::string::npos) break;
|
||||||
cmd.replace(i, macro.size(), content);
|
cmd.replace(i, macro.size(), content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ const char *Fl_Kdialog_Native_File_Chooser_Driver::title() const {
|
|||||||
//
|
//
|
||||||
void Fl_Kdialog_Native_File_Chooser_Driver::shell_quote(Fl_String& s) {
|
void Fl_Kdialog_Native_File_Chooser_Driver::shell_quote(Fl_String& s) {
|
||||||
Fl_String out = "'"; // leading quote
|
Fl_String out = "'"; // leading quote
|
||||||
for (int t=0; t<s.size(); t++) {
|
for (int t=0; t<(int)s.size(); t++) {
|
||||||
if (s[t] == '\'') out += "'\"'\"'"; // quote any quotes
|
if (s[t] == '\'') out += "'\"'\"'"; // quote any quotes
|
||||||
else out += s[t];
|
else out += s[t];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -555,10 +555,10 @@ char *Fl_Unix_System_Driver::preference_user_rootnode(
|
|||||||
if (prefs_path_14.find("~/")==0) // starts with "~"
|
if (prefs_path_14.find("~/")==0) // starts with "~"
|
||||||
prefs_path_14.replace(0, 1, home_path);
|
prefs_path_14.replace(0, 1, home_path);
|
||||||
int h_env = prefs_path_14.find("${HOME}");
|
int h_env = prefs_path_14.find("${HOME}");
|
||||||
if (h_env!=prefs_path_14.npos)
|
if (h_env!=(int)prefs_path_14.npos)
|
||||||
prefs_path_14.replace(h_env, 7, home_path);
|
prefs_path_14.replace(h_env, 7, home_path);
|
||||||
h_env = prefs_path_14.find("$HOME/");
|
h_env = prefs_path_14.find("$HOME/");
|
||||||
if (h_env!=prefs_path_14.npos)
|
if (h_env!=(int)prefs_path_14.npos)
|
||||||
prefs_path_14.replace(h_env, 5, home_path);
|
prefs_path_14.replace(h_env, 5, home_path);
|
||||||
}
|
}
|
||||||
if (prefs_path_14[prefs_path_14.size()-1]!='/')
|
if (prefs_path_14[prefs_path_14.size()-1]!='/')
|
||||||
|
|||||||
Reference in New Issue
Block a user