Changeset 1103


Ignore:
Timestamp:
Feb 6, 2007, 11:10:01 AM (13 years ago)
Author:
bruno
Message:

Fix again another set of compiler warnings (Michel Loiseleur <mloiseleur_at_linagora.com>)

Location:
branches/stable/mondo/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-fifo-EXT.h

    r128 r1103  
    44                                    long internal_block_size);
    55extern void sigpipe_occurred(int);
    6 extern void kill_buffer();
     6extern void kill_buffer(void);
  • branches/stable/mondo/src/common/libmondo-filelist.c

    r1082 r1103  
    420420    }
    421421    filelist->ch = '\0';
    422     mr_free(filelist);
     422    mr_free((void*) filelist);
    423423    depth--;
    424424    if (depth == 0) {
     
    429429
    430430
    431 int call_exe_and_pipe_output_to_fd(char *syscall, FILE * pout)
     431int call_exe_and_pipe_output_to_fd(char *sys_call, FILE * pout)
    432432{
    433433    FILE *pattr;
    434434    char *tmp;
    435     pattr = popen(syscall, "r");
     435    pattr = popen(sys_call, "r");
    436436    if (!pattr) {
    437         log_msg(1, "Failed to open fattr() %s", syscall);
     437        log_msg(1, "Failed to open fattr() %s", sys_call);
    438438        return (1);
    439439    }
    440440    if (feof(pattr)) {
    441         log_msg(1, "Failed to call fattr() %s", syscall);
     441        log_msg(1, "Failed to call fattr() %s", sys_call);
    442442        paranoid_pclose(pattr);
    443443        return (2);
     
    461461    FILE *pout;
    462462    char *pout_command;
    463     char *syscall;
     463    char *sys_call;
    464464    char *file_to_analyze;
    465465    char *strtmp = NULL;
     
    487487        log_msg(8, "Analyzing %s", file_to_analyze);
    488488        asprintf(&strtmp, syscall_sprintf, mr_stresc(file_to_analyze, "`$\\\"", '\\'));
    489         asprintf(&syscall, "%s 2>> /dev/null", strtmp); // " MONDO_LOGFILE);
     489        asprintf(&sys_call, "%s 2>> /dev/null", strtmp);    // " MONDO_LOGFILE);
    490490        mr_free(strtmp);
    491         call_exe_and_pipe_output_to_fd(syscall, pout);
    492         mr_free(syscall);
     491        call_exe_and_pipe_output_to_fd(sys_call, pout);
     492        mr_free(sys_call);
    493493    }
    494494    paranoid_fclose(fin);
  • branches/stable/mondo/src/common/libmondo-raid.c

    r1080 r1103  
    232232 */
    233233void add_disk_to_raid_device(struct list_of_disks *disklist,
    234                              char *device_to_add, int index)
     234                             char *device_to_add, int idx)
    235235{
    236236    int items;
     
    240240    items = disklist->entries;
    241241    strcpy(disklist->el[items].device, device_to_add);
    242     disklist->el[items].index = index;
     242    disklist->el[items].index = idx;
    243243    items++;
    244244    disklist->entries = items;
     
    696696
    697697    struct list_of_disks *disklist;
    698     int index;
    699698    int v;
    700699
     
    754753            log_it(tmp);
    755754        } else {
    756             index = atoi(valueB);
    757             add_disk_to_raid_device(disklist, value, index);
     755            add_disk_to_raid_device(disklist, value, atoi(valueB));
    758756        }
    759757    } else {
  • branches/stable/mondo/src/common/libmondo-tools.h

    r128 r1103  
    33     */
    44
     5#ifndef LIBMONDO_TOOLS_H
     6# define LIBMONDO_TOOLS_H
     7
    58void clean_up_KDE_desktop_if_necessary(void);
    69
    7 long get_time();
     10long get_time(void);
    811extern void (*log_debug_msg) (int debug_level, const char *szFile,
    912                              const char *szFunction, int nLine,
     
    2124#endif
    2225void log_trace(char *o);
    23 int some_basic_system_sanity_checks();
     26int some_basic_system_sanity_checks(void);
    2427
    2528
     
    4750void free_libmondo_global_strings(void);
    4851
    49 double get_kernel_version();
    50 char *get_architecture();
     52double get_kernel_version(void);
     53char *get_architecture(void);
    5154bool does_nonMS_partition_exist(void);
    5255void stop_magicdev_if_necessary(void);
     
    5457void stop_autofs_if_necessary(void);
    5558void restart_autofs_if_necessary(void);
     59
     60#endif /* LIBMONDO_TOOLS_H */
     61
  • branches/stable/mondo/src/common/newt-specific.c

    r1080 r1103  
    9696     g_xmondo_stdout[MAX_NEWT_COMMENT_LEN]; ///< .... @bug Unneeded w/current XMondo.
    9797    bool g_called_by_xmondo = FALSE;    ///< @bug Unneeded w/current XMondo.
    98     char *g_erase_tmpdir_and_scratchdir;    ///< The command to run to erase the tmpdir and scratchdir at the end of Mondo.
    99     char *g_selfmounted_isodir; ///< Holds the NFS mountpoint if mounted via mondoarchive.
     98    char *g_erase_tmpdir_and_scratchdir = NULL; ///< The command to run to erase the tmpdir and scratchdir at the end of Mondo.
     99    char *g_selfmounted_isodir = NULL;  ///< Holds the NFS mountpoint if mounted via mondoarchive.
    100100
    101101/* @} - end of globalGroup */
     
    375375 */
    376376    void
    377      finish(int signal) {
     377     finish(int signal_code) {
    378378        char *command;
    379379        malloc_string(command);
    380380
    381         /*  if (signal==0) { popup_and_OK("Please press <enter> to quit."); } */
     381        /*  if (signal_code==0) { popup_and_OK("Please press <enter> to quit."); } */
    382382
    383383        /* newtPopHelpLine(); */
     
    411411//  system("clear");
    412412//  iamhere("Finished calling newtFinished");
    413         printf("Execution run ended; result=%d\n", signal);
     413        printf("Execution run ended; result=%d\n", signal_code);
    414414        printf("Type 'less %s' to see the output log\n", MONDO_LOGFILE);
    415415        free_libmondo_global_strings();
    416         exit(signal);
     416        exit(signal_code);
    417417    }
    418418
     
    693693    void
    694694     popup_and_OK(char *prompt) {
    695         char ch;
     695        int ch;
    696696
    697697        assert_string_is_neither_NULL_nor_zerolength(prompt);
  • branches/stable/mondo/src/common/newt-specific.h

    r128 r1103  
    33 */
    44
    5 
     5#ifndef NEWT_SPECIFIC_H
     6# define NEWT_SPECIFIC_H
    67#ifndef H_NEWT
    78#include <newt.h>
     
    1112bool ask_me_OK_or_cancel(char *prompt);
    1213void close_evalcall_form(void);
    13 void close_progress_form();
     14void close_progress_form(void);
    1415void fatal_error(char *error_string);
    1516void finish(int signal);
     
    2324bool popup_and_get_string(char *title, char *b, char *output, int maxsize);
    2425bool popup_with_buttons(char *p, char *button1, char *button2);
    25 void refresh_log_screen();
    26 void setup_newt_stuff();
     26void refresh_log_screen(void);
     27void setup_newt_stuff(void);
    2728void update_evalcall_form_ratio(int num, int denom);
    2829void update_evalcall_form(int curr);
     
    3637
    3738t_bkptype which_backup_media_type(bool);
    38 int which_compression_level();
     39int which_compression_level(void);
    3940
    4041
    4142void popup_changelist_from_file(char *source_file);
     43
     44#endif /* NEWT_SPECIFIC_H */
     45
  • branches/stable/mondo/src/include/my-stuff.h

    r1087 r1103  
    275275 * Free variables and call finish(@p x).
    276276 */
    277 #define paranoid_MR_finish(x) {free_MR_global_filenames (); if (g_bkpinfo_DONTUSETHIS) mr_free ( g_bkpinfo_DONTUSETHIS ); finish(x); }
     277#define paranoid_MR_finish(x) {free_MR_global_filenames (); if (g_bkpinfo_DONTUSETHIS) mr_free ( (void*) g_bkpinfo_DONTUSETHIS ); finish(x); }
    278278
    279279/**
  • branches/stable/mondo/src/mondorestore/mondo-prep.c

    r1080 r1103  
    20022002    system("clear");
    20032003    newtResume();
    2004     mr_free(drivelist);
     2004    mr_free((void*) drivelist);
    20052005    return (retval);
    20062006}
     
    26052605    }
    26062606    log_to_screen("Mountlist adjusted to suit current hard drive(s)");
    2607     mr_free(drivelist);
     2607    mr_free((void*) drivelist);
    26082608}
    26092609
  • branches/stable/mondo/src/mondorestore/mondo-rstr-newt.c

    r1087 r1103  
    7676    /** int ****************************************************************/
    7777    int i = 0;
    78     int index = 0;
     78    int idx = 0;
    7979    int currline = 0;
    8080    int items = 0;
     
    109109            log_it("I don't know what this button does");
    110110        } else {
    111             index = find_next_free_index_in_disklist(disklist);
     111            idx = find_next_free_index_in_disklist(disklist);
    112112
    113113            items = disklist->entries;
    114114            strcpy(disklist->el[items].device,
    115115                   unallocated_raid_partitions->el[currline].device);
    116             disklist->el[items].index = index;
     116            disklist->el[items].index = idx;
    117117            disklist->entries = ++items;
    118118
     
    16601660    mr_free(sz_parity_disks);
    16611661    mr_free(sz_failed_disks);
    1662     mr_free(bkp_raidrec);
     1662    mr_free((void*) bkp_raidrec);
    16631663#endif
    16641664}
     
    21882188
    21892189    /** int ***************************************************************/
    2190     int index = -1;
     2190    int idx = -1;
    21912191    int pos = 0;
    21922192
     
    21982198    for (done = FALSE; !done;) {
    21992199        for (pos = 0;
    2200              pos < disklist->entries && disklist->el[pos].index <= index;
     2200             pos < disklist->entries && disklist->el[pos].index <= idx;
    22012201             pos++);
    22022202        if (pos >= disklist->entries) {
    22032203            done = TRUE;
    22042204        } else {
    2205             index = disklist->el[pos].index;
    2206         }
    2207     }
    2208     return (index + 1);
     2205            idx = disklist->el[pos].index;
     2206        }
     2207    }
     2208    return (idx + 1);
    22092209}
    22102210
     
    23892389 * Dummy function that proves that we can get to the point where Mondo is run.
    23902390 */
    2391 void nuke_mode_dummy()
     2391void nuke_mode_dummy(void)
    23922392{
    23932393
     
    28462846    mr_free(sz_res);
    28472847    mr_free(header_text);
    2848     mr_free(bkp_raidrec);
    2849     mr_free(bkp_disklist);
    2850     mr_free(bkp_raidlist);
    2851     mr_free(unallocated_raid_partitions);
     2848    mr_free((void*) bkp_raidrec);
     2849    mr_free((void*) bkp_disklist);
     2850    mr_free((void*) bkp_raidlist);
     2851    mr_free((void*) unallocated_raid_partitions);
    28522852}
    28532853#endif
  • branches/stable/mondo/src/mondorestore/mondo-rstr-newt.h

    r1067 r1103  
    157157char *mountlist_entry_to_string(struct mountlist_itself *, int);
    158158void mvaddstr_and_log_it(int, int, char *);
    159 void nuke_mode_dummy();
     159void nuke_mode_dummy(void);
    160160char *number_of_disks_as_string(int, char *);
    161161void open_evalcall_form(char *);
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools-EXT.h

    r912 r1103  
    33 */
    44
    5 extern void free_MR_global_filenames();
     5extern void free_MR_global_filenames(void);
    66extern void get_cfg_file_from_archive_or_bust(struct s_bkpinfo *);
    77extern bool is_file_in_list(char *, char *, char *);    /* needle, haystack, preamble */
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c

    r1102 r1103  
    5353 * Free the malloc()s for the filename variables.
    5454 */
    55 void free_MR_global_filenames()
     55void free_MR_global_filenames(void)
    5656{
    5757    mr_free(g_biggielist_txt);
     
    556556    }
    557557    run_program_and_log_output("df -m", 3);
    558     mr_free(mountlist);
     558    mr_free((void*) mountlist);
    559559    mr_free(tmp);
    560560    mr_free(format);
     
    21782178        log_to_screen("All partitions were unmounted OK.");
    21792179    }
    2180     mr_free(mountlist);
     2180    mr_free((void*) mountlist);
    21812181    mr_free(command);
    21822182    mr_free(tmp);
     
    25572557    }
    25582558    mr_free(screen_message);
    2559     mr_free(raidlist);
    2560 }
     2559    mr_free((void*) raidlist);
     2560}
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.h

    r1052 r1103  
    33 */
    44
    5 void free_global_filenames();
     5void free_global_filenames(void);
    66void get_cfg_file_from_archive_or_bust(struct s_bkpinfo *);
    77bool is_file_in_list(char *, char *, char *);   /* needle, haystack, preamble */
Note: See TracChangeset for help on using the changeset viewer.