Ignore:
Timestamp:
Oct 7, 2012, 8:44:28 PM (8 years ago)
Author:
Bruno Cornec
Message:
  • Fix some compilations warnings and 1 error
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/common/libmondo-fork.c

    r3037 r3042  
    261261    /*@ int ********************************************************* */
    262262    int res;
    263     int i;
    264     int len;
    265263    bool log_if_failure = FALSE;
    266264    bool log_if_success = FALSE;
     
    285283        log_if_failure = TRUE;
    286284    }
    287     mr_asprintf(callstr, "%s > %s/mondo-run-prog-thing.tmp 2> %s/mondo-run-prog-thing.err", program, bkpinfo->tmpdir, bkpinfo->tmpdir);
     285    mr_asprintf(&callstr, "%s > %s/mondo-run-prog-thing.tmp 2> %s/mondo-run-prog-thing.err", program, bkpinfo->tmpdir, bkpinfo->tmpdir);
    288286    while ((p = strchr(callstr, '\r'))) {
    289287        *p = ' ';
     
    294292
    295293
    296     len = (int) strlen(program);
    297     for (i = 0; i < 35 - len / 2; i++) {
    298         tmp[i] = '-';
    299     }
    300     tmp[i] = '\0';
    301     strcat(tmp, " ");
    302     strcat(tmp, program);
    303     strcat(tmp, " ");
    304     for (i = 0; i < 35 - len / 2; i++) {
    305         strcat(tmp, "-");
    306     }
    307     strcpy(initial_label, tmp);
    308294    res = system(callstr);
    309295    if (((res == 0) && log_if_success) || ((res != 0) && log_if_failure)) {
     
    313299    mr_free(callstr);
    314300
    315     mr_asprintf(callstr, "cat %s/mondo-run-prog-thing.err >> %s/mondo-run-prog-thing.tmp 2> /dev/null", bkpinfo->tmpdir, bkpinfo->tmpdir);
     301    mr_asprintf(&callstr, "cat %s/mondo-run-prog-thing.err >> %s/mondo-run-prog-thing.tmp 2> /dev/null", bkpinfo->tmpdir, bkpinfo->tmpdir);
    316302    if (log_if_failure && system(callstr)) {
    317303        log_OS_error("Command failed");
     
    319305    mr_free(callstr);
    320306
    321     mr_asprintf(tmp1, "%s/mondo-run-prog-thing.err", bkpinfo->tmpdir);
     307    mr_asprintf(&tmp1, "%s/mondo-run-prog-thing.err", bkpinfo->tmpdir);
    322308    unlink(tmp1);
    323309    mr_free(tmp1);
    324310
    325     mr_asprintf(tmp1, "%s/mondo-run-prog-thing.tmp", bkpinfo->tmpdir);
     311    mr_asprintf(&tmp1, "%s/mondo-run-prog-thing.tmp", bkpinfo->tmpdir);
    326312    fin = fopen(tmp1, "r");
    327313    if (fin) {
Note: See TracChangeset for help on using the changeset viewer.