summaryrefslogtreecommitdiff
path: root/src/file.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2018-07-01 20:00:53 -0400
committerPaul Smith <psmith@gnu.org>2018-07-02 07:54:07 -0400
commit0ce880e5ee7b4c5670aa676354ae10df448a616d (patch)
treef913a93e074330a463a49da3c3bcf9d9a57bf6b2 /src/file.c
parentc808f10d0886cd4f7a8e88a2edd025a091f188a5 (diff)
downloadmake-git-0ce880e5ee7b4c5670aa676354ae10df448a616d.tar.gz
Resolve most of the Windows Visual Studio warnings.
* Convert integer types to size_t where necessary. * Align other integral types to avoid casts and type warnings.
Diffstat (limited to 'src/file.c')
-rw-r--r--src/file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/file.c b/src/file.c
index 9e3208cc..4835e4f8 100644
--- a/src/file.c
+++ b/src/file.c
@@ -492,7 +492,7 @@ enter_prereqs (struct dep *deps, const char *stem)
while (dp != 0)
{
char *percent;
- int nl = strlen (dp->name) + 1;
+ size_t nl = strlen (dp->name) + 1;
char *nm = alloca (nl);
memcpy (nm, dp->name, nl);
percent = find_percent (nm);
@@ -1100,8 +1100,8 @@ build_target_list (char *value)
if (files.ht_fill != last_targ_count)
{
- unsigned long max = EXPANSION_INCREMENT (strlen (value));
- unsigned long len;
+ size_t max = EXPANSION_INCREMENT (strlen (value));
+ size_t len;
char *p;
struct file **fp = (struct file **) files.ht_vec;
struct file **end = &fp[files.ht_size];
@@ -1115,12 +1115,12 @@ build_target_list (char *value)
if (!HASH_VACANT (*fp) && (*fp)->is_target)
{
struct file *f = *fp;
- int l = strlen (f->name);
+ size_t l = strlen (f->name);
len += l + 1;
if (len > max)
{
- unsigned long off = p - value;
+ size_t off = p - value;
max += EXPANSION_INCREMENT (l + 1);
value = xrealloc (value, max);