Ignore:
Timestamp:
Nov 10, 2012, 5:05:37 AM (11 years ago)
Author:
Bruno Cornec
Message:

r5035@localhost: bruno | 2012-11-09 03:17:01 +0100

  • Fix a compilation error and most compilation warnings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/mondorestore/mondo-rstr-compare.c

    r3056 r3060  
    9393        return (1);
    9494    }
    95     fread((void *) &biggiestruct, 1, sizeof(biggiestruct), fin);
     95    if (fread((void *) &biggiestruct, 1, sizeof(biggiestruct), fin)) {
     96        // FIXME
     97    }
    9698    paranoid_fclose(fin);
    9799
     
    134136            return (1);
    135137        } else {
    136             fgets(original_cksum_ptr, MAX_STR_LEN - 1, fin);
     138            if (fgets(original_cksum_ptr, MAX_STR_LEN - 1, fin)) {
     139                // FIXME
     140            }
    137141            paranoid_fclose(fin);
    138142            for (i = strlen(original_cksum_ptr);
     
    245249    int retval = 0;
    246250    int res;
    247     long noof_lines;
    248251    long archiver_errors;
    249252    bool use_star;
     
    265268    sprintf(filelist_name, MNT_CDROM "/archives/filelist.%d",
    266269            current_tarball_number);
    267 
    268     noof_lines = count_lines_in_file(filelist_name);
    269270
    270271    if (strstr(tarball_fname, ".bz2")) {
     
    336337                "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort -u | grep -vE \"^dev/.*\" >> "MONDO_CACHE"/changed.txt",
    337338                logfile);
    338         system(command);
     339        paranoid_system(command);
    339340        archiver_errors = count_lines_in_file(logfile);
    340341    } else {
     
    372373{
    373374    int retval = 0;
    374     int res;
    375375    int current_tarball_number = 0;
    376376
     
    439439            log_to_screen(progress_str);
    440440        } else {
    441             res = compare_a_tarball(tarball_fname, current_tarball_number);
     441            retval += compare_a_tarball(tarball_fname, current_tarball_number);
    442442
    443443            g_current_progress++;
     
    490490    assert(bkpinfo != NULL);
    491491
    492     getcwd(cwd, MAX_STR_LEN - 1);
    493     chdir(bkpinfo->restore_path);
    494     getcwd(new, MAX_STR_LEN - 1);
     492    if (getcwd(cwd, MAX_STR_LEN - 1)) {
     493        // FIXME
     494    }
     495    if (chdir(bkpinfo->restore_path)) {
     496        //FIXME
     497    }
     498    if (getcwd(new, MAX_STR_LEN - 1)) {
     499        // FIXME
     500    }
    495501    insist_on_this_cd_number(g_current_media_number);
    496502    unlink(MONDO_CACHE"/changed.txt");
     
    498504    resA = compare_all_tarballs();
    499505    resB = compare_all_biggiefiles();
    500     chdir(cwd);
     506    if (chdir(cwd)) {
     507        // FIXME
     508    }
    501509    noof_changed_files = count_lines_in_file(MONDO_CACHE"/changed.txt");
    502510    if (noof_changed_files) {
     
    633641
    634642            log_msg(2, "calling popup_changelist_from_file()");
    635             getcwd(cwd, MAX_STR_LEN - 1);
    636             chdir(bkpinfo->restore_path);
    637             getcwd(new, MAX_STR_LEN - 1);
     643            if (getcwd(cwd, MAX_STR_LEN - 1)) {
     644                //FIXME
     645            }
     646            if (chdir(bkpinfo->restore_path)) {
     647                // FIXME
     648            }
     649            if (getcwd(new, MAX_STR_LEN - 1)) {
     650                //FIXME
     651            }
    638652            popup_changelist_from_file(MONDO_CACHE"/changed.files");
    639             chdir(cwd);
     653            if (chdir(cwd)) {
     654                // FIXME
     655            }
    640656            log_msg(2, "Returning from popup_changelist_from_file()");
    641657        }
     
    675691    malloc_string(dir);
    676692    malloc_string(command);
    677     getcwd(dir, MAX_STR_LEN);
    678     chdir(bkpinfo->restore_path);
     693    if (getcwd(dir, MAX_STR_LEN)) {
     694        // FIXME
     695    }
     696    if (chdir(bkpinfo->restore_path)) {
     697        // FIXME
     698    }
    679699
    680700    sprintf(command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp",
     
    692712    }
    693713    res = verify_tape_backups();
    694     chdir(dir);
     714    if (chdir(dir)) {
     715        // FIXME
     716    }
    695717    if (length_of_file(MONDO_CACHE"/changed.txt") > 2
    696718        && length_of_file(MONDO_CACHE"/changed.files") > 2) {
     
    733755    malloc_string(command);
    734756
    735     getcwd(dir, MAX_STR_LEN);
    736     chdir(bkpinfo->restore_path);
     757    if (getcwd(dir, MAX_STR_LEN)) {
     758        // FIXME
     759    }
     760    if (chdir(bkpinfo->restore_path)) {
     761        // FIXME
     762    }
    737763    sprintf(command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp",
    738764            bkpinfo->restore_path);
     
    741767                        0, "Verifying archives against filesystem");
    742768    res = verify_tape_backups();
    743     chdir(dir);
     769    if (chdir(dir)) {
     770        // FIXME
     771    }
    744772    if (res) {
    745773        mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
Note: See TracChangeset for help on using the changeset viewer.