if (restart && !m_ise_exiting && m_restart_needed) {
struct tms tiks_buf;
static clock_t start_tiks = times (&tiks_buf);
- static double clock_tiks = (double)sysconf (_SC_CLK_TCK);
+ static clock_t clock_tiks = sysconf (_SC_CLK_TCK);
clock_t curr_tiks = times (&tiks_buf);
- double secs = (double) (curr_tiks - start_tiks) / clock_tiks;
+ clock_t secs = (curr_tiks - start_tiks) / clock_tiks;
//LOGE ("time second:%f", secs);
static String restart_uuid;
lt_ptr data2)
{
int result = 0;
- int filenamesize = 0;
+ size_t filenamesize = 0;
size_t lenbase = LT_STRLEN (base_name);
size_t argz_len = 0;
char *argz = 0;
{
size_t lendir = LT_STRLEN (dir_name);
- if ((int)(lendir +1 +lenbase) >= filenamesize)
+ if ((lendir +1 +lenbase) >= filenamesize)
{
LT_DLFREE (filename);
filenamesize = lendir +1 +lenbase +1; /* "/d" + '/' + "f" + '\0' */
}
assert ((int)lendir > 0);
- assert (filenamesize > (int)lendir);
+ assert (filenamesize > lendir);
strncpy (filename, dir_name, filenamesize);
if (base_name && *base_name)
if (maxlen_before < 0) pos = 0;
if (pos > (int)buffer.length()) pos = (int)buffer.length();
if (pos < 0) pos = 0;
- size_t len = maxlen_after + (cursor - pos);
+ size_t len = (maxlen_after + (cursor - pos)) > 0 ? maxlen_after + (cursor - pos) : 0;
if (maxlen_after < 0) len = String::npos;
text = buffer.substr (pos, len);
} else {