Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit fc316b00 authored by rswindell's avatar rswindell

Resolve new GCC warnings:

comparison between signed and unsigned integer expressions
parent 8294d741
/* cmdshell.h */ /* cmdshell.h */
// vi: tabstop=4
/* Synchronet command shell/module constants and structure definitions */ /* Synchronet command shell/module constants and structure definitions */
...@@ -670,7 +671,8 @@ typedef struct { /* Command shell image */ ...@@ -670,7 +671,8 @@ typedef struct { /* Command shell image */
cmdrets; /* Command returns on stack */ cmdrets; /* Command returns on stack */
int32_t ftp_mode, /* FTP operation mode */ int32_t ftp_mode, /* FTP operation mode */
*int_var, /* Integer variables */ *int_var; /* Integer variables */
uint32_t
*str_var_name, /* String variable names (CRC-32) */ *str_var_name, /* String variable names (CRC-32) */
*int_var_name; /* Integer variable names (CRC-32) */ *int_var_name; /* Integer variable names (CRC-32) */
long retval, /* Return value */ long retval, /* Return value */
......
...@@ -138,7 +138,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path) ...@@ -138,7 +138,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path)
csi->str_vars++; csi->str_vars++;
csi->str_var=(char **)realloc(csi->str_var csi->str_var=(char **)realloc(csi->str_var
,sizeof(char *)*csi->str_vars); ,sizeof(char *)*csi->str_vars);
csi->str_var_name=(int32_t *)realloc(csi->str_var_name csi->str_var_name=(uint32_t *)realloc(csi->str_var_name
,sizeof(int32_t)*csi->str_vars); ,sizeof(int32_t)*csi->str_vars);
if(csi->str_var==NULL if(csi->str_var==NULL
|| csi->str_var_name==NULL) { /* REALLOC failed */ || csi->str_var_name==NULL) { /* REALLOC failed */
...@@ -168,7 +168,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path) ...@@ -168,7 +168,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path)
csi->int_vars++; csi->int_vars++;
csi->int_var=(int32_t *)realloc(csi->int_var csi->int_var=(int32_t *)realloc(csi->int_var
,sizeof(char *)*csi->int_vars); ,sizeof(char *)*csi->int_vars);
csi->int_var_name=(int32_t *)realloc(csi->int_var_name csi->int_var_name=(uint32_t *)realloc(csi->int_var_name
,sizeof(int32_t)*csi->int_vars); ,sizeof(int32_t)*csi->int_vars);
if(csi->int_var==NULL if(csi->int_var==NULL
|| csi->int_var_name==NULL) { /* REALLOC failed */ || csi->int_var_name==NULL) { /* REALLOC failed */
...@@ -198,7 +198,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path) ...@@ -198,7 +198,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path)
global_str_vars++; global_str_vars++;
global_str_var=(char **)realloc(global_str_var global_str_var=(char **)realloc(global_str_var
,sizeof(char *)*global_str_vars); ,sizeof(char *)*global_str_vars);
global_str_var_name=(int32_t *)realloc(global_str_var_name global_str_var_name=(uint32_t *)realloc(global_str_var_name
,sizeof(int32_t)*global_str_vars); ,sizeof(int32_t)*global_str_vars);
if(global_str_var==NULL if(global_str_var==NULL
|| global_str_var_name==NULL) { /* REALLOC failed */ || global_str_var_name==NULL) { /* REALLOC failed */
...@@ -229,7 +229,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path) ...@@ -229,7 +229,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path)
global_int_vars++; global_int_vars++;
global_int_var=(int32_t *)realloc(global_int_var global_int_var=(int32_t *)realloc(global_int_var
,sizeof(char *)*global_int_vars); ,sizeof(char *)*global_int_vars);
global_int_var_name=(int32_t *)realloc(global_int_var_name global_int_var_name=(uint32_t *)realloc(global_int_var_name
,sizeof(int32_t)*global_int_vars); ,sizeof(int32_t)*global_int_vars);
if(global_int_var==NULL if(global_int_var==NULL
|| global_int_var_name==NULL) { /* REALLOC failed */ || global_int_var_name==NULL) { /* REALLOC failed */
......
...@@ -541,10 +541,10 @@ public: ...@@ -541,10 +541,10 @@ public:
/* Global command shell variables */ /* Global command shell variables */
uint global_str_vars; uint global_str_vars;
char ** global_str_var; char ** global_str_var;
int32_t * global_str_var_name; uint32_t * global_str_var_name;
uint global_int_vars; uint global_int_vars;
int32_t * global_int_var; int32_t * global_int_var;
int32_t * global_int_var_name; uint32_t * global_int_var_name;
char * sysvar_p[MAX_SYSVARS]; char * sysvar_p[MAX_SYSVARS];
uint sysvar_pi; uint sysvar_pi;
int32_t sysvar_l[MAX_SYSVARS]; int32_t sysvar_l[MAX_SYSVARS];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment