Fix warnings when building jam.

Sorry for the included whitespace cleanup.
This commit is contained in:
Oliver Tappe 2014-05-12 23:17:14 +02:00
parent c20a732df8
commit 6c03949644
3 changed files with 51 additions and 49 deletions

View File

@ -50,6 +50,10 @@
# include <process.h>
# endif
# ifdef unix
# include <unistd.h>
# endif
# ifdef OS_NT
# define USE_EXECNT
# include <process.h>
@ -231,7 +235,7 @@ execcmd(
# else
if ((pid = vfork()) == 0)
{
execvp( argv[0], argv );
execvp( argv[0], (char* const*)argv );
_exit(127);
}
# endif

View File

@ -42,7 +42,7 @@
* */
struct hcachedata {
char *boundname;
const char *boundname;
time_t time;
LIST *includes;
LIST *hdrscan; /* the HDRSCAN value for this target */
@ -70,10 +70,10 @@ static int hits = 0;
* We cache the result so the user can't change the cache file during
* header scanning.
*/
static char*
static const char*
cache_name(void)
{
static char* name = 0;
static const char* name = 0;
if (!name) {
LIST *hcachevar = var_get("HCACHEFILE");
@ -116,7 +116,7 @@ cache_maxage(void)
* ASCII 0. The returned value is as returned by newstr(), so it need
* not be freed.
*/
char*
const char*
read_netstring(FILE* f)
{
unsigned long len;
@ -168,10 +168,10 @@ void
hcache_init()
{
HCACHEDATA cachedata, *c;
FILE *f;
char *version;
int header_count = 0;
char* hcachename;
FILE *f;
const char *version;
int header_count = 0;
const char* hcachename;
hcachehash = hashinit (sizeof (HCACHEDATA), "hcache");
@ -189,11 +189,11 @@ hcache_init()
while (1)
{
char* record_type;
char *time_str;
char *age_str;
char *includes_count_str;
char *hdrscan_count_str;
const char* record_type;
const char *time_str;
const char *age_str;
const char *includes_count_str;
const char *hdrscan_count_str;
int i, count;
LIST *l;
@ -230,7 +230,7 @@ hcache_init()
count = atoi(includes_count_str);
for (l = 0, i = 0; i < count; i++) {
char* s = read_netstring(f);
const char* s = read_netstring(f);
if (!s) {
fprintf(stderr, "invalid %s\n", hcachename);
goto bail;
@ -248,7 +248,7 @@ hcache_init()
count = atoi(hdrscan_count_str);
for (l = 0, i = 0; i < count; i++) {
char* s = read_netstring(f);
const char* s = read_netstring(f);
if (!s) {
fprintf(stderr, "invalid %s\n", hcachename);
goto bail;
@ -280,11 +280,11 @@ hcache_init()
void
hcache_done()
{
FILE *f;
FILE *f;
HCACHEDATA *c;
int header_count = 0;
char* hcachename;
int maxage;
int header_count = 0;
const char* hcachename;
int maxage;
if (!hcachehash)
return;

View File

@ -38,9 +38,7 @@
# ifdef USE_PATHUNIX
# if defined( OS_MACOSX )
/* need unistd for the prototype for getcwd to avoid defaulting return to int on 64bit */
/* XXX: others too ? */
# if defined( unix )
# include <unistd.h>
# endif