Commit b26cefe4b117ff50fef8d7bb5713eaf880a90f0b
1 parent
24af26e1
Fix type conversion problem on OpenSolaris
Showing
1 changed file
with
4 additions
and
4 deletions
src/support/GDaemon.cpp
| ... | ... | @@ -267,7 +267,7 @@ std::string GDaemon::print(const GChatter& chatter) const |
| 267 | 267 | |
| 268 | 268 | // Append information |
| 269 | 269 | result.append("\n"+gammalib::parformat("Process ID")); |
| 270 | - result.append(gammalib::str(m_pid)); | |
| 270 | + result.append(gammalib::str((int)(m_pid))); | |
| 271 | 271 | result.append("\n"+gammalib::parformat("Wake up period (s)")); |
| 272 | 272 | result.append(gammalib::str(m_period)); |
| 273 | 273 | result.append("\n"+gammalib::parformat("Logger chatter level")); |
| ... | ... | @@ -293,7 +293,7 @@ void GDaemon::init_members(void) |
| 293 | 293 | { |
| 294 | 294 | // Initialise members |
| 295 | 295 | m_pid = 0; //!< No process ID |
| 296 | - m_period = 3600.0; //!< Wake-up daemon every hour | |
| 296 | + m_period = 3600; //!< Wake-up daemon every hour | |
| 297 | 297 | m_log.clear(); |
| 298 | 298 | m_chatter = NORMAL; //!< NORMAL chatter level |
| 299 | 299 | |
| ... | ... | @@ -353,14 +353,14 @@ void GDaemon::create_lock_file(void) |
| 353 | 353 | m_pid = getpid(); |
| 354 | 354 | |
| 355 | 355 | // Write process ID into lockfile |
| 356 | - fprintf(fptr, "%d\n", m_pid); | |
| 356 | + fprintf(fptr, "%d\n", (int)(m_pid)); | |
| 357 | 357 | |
| 358 | 358 | // Close lockfile |
| 359 | 359 | fclose(fptr); |
| 360 | 360 | |
| 361 | 361 | // Log creation of lock file |
| 362 | 362 | m_log << "Created lock file \"" << lockfile.url(); |
| 363 | - m_log << "\" for PID " << m_pid << std::endl; | |
| 363 | + m_log << "\" for PID " << (int)(m_pid) << std::endl; | |
| 364 | 364 | |
| 365 | 365 | } // endif: Lock file opened successfully |
| 366 | 366 | ... | ... |