aboutsummaryrefslogtreecommitdiff
path: root/net/atlas-probe/patches/007-Cast-size_t-to-long-to-mute-warning-on-32bit-systems.patch
blob: 0e2d3cb78e066ba2174c326ee8b315380ca72ef7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
From d8bd85fba865508c0c6dff57b14c98f3ca70bbfc Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Mon, 17 Oct 2022 19:18:06 +0200
Subject: [PATCH] Cast size_t to long to mute warning on 32bit systems

Cast size_t to long to mute warning on 32bit systems.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 eperd/evtdig.c     | 10 +++++-----
 eperd/sslgetcert.c |  2 +-
 libbb/atlas_bb64.c |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

--- a/eperd/evtdig.c
+++ b/eperd/evtdig.c
@@ -3792,7 +3792,7 @@ unsigned char* ReadName(unsigned char *b
 				/* Bad format */
 				snprintf((char *)name, sizeof(name),
 					"format-error at %lu: value 0x%x",
-					offset, len);
+					(unsigned long)offset, len);
 				*count= -1;
 				free(name); name= NULL;
 				return name;
@@ -3803,7 +3803,7 @@ unsigned char* ReadName(unsigned char *b
 			{
 				snprintf((char *)name, sizeof(name),
 					"offset-error at %lu: offset %lu",
-					offset, noffset);
+					(unsigned long)offset, (unsigned long)noffset);
 				*count= -1;
 				free(name); name= NULL;
 				return name;
@@ -3814,7 +3814,7 @@ unsigned char* ReadName(unsigned char *b
 				/* Too many */
 				snprintf((char *)name, sizeof(name),
 					"too many redirects at %lu",
-						offset);
+						(unsigned long)offset);
 				*count= -1;
 				free(name); name= NULL;
 				return name;
@@ -3836,7 +3836,7 @@ unsigned char* ReadName(unsigned char *b
 		{
 			snprintf((char *)name, sizeof(name),
 				"buf-bounds-error at %lu: len %d",
-					offset, len);
+					(unsigned long)offset, len);
 			*count= -1;
 			free(name); name= NULL;
 			return name;
@@ -3846,7 +3846,7 @@ unsigned char* ReadName(unsigned char *b
 		{
 			snprintf((char *)name, sizeof(name),
 					"name-length-error at %lu: len %d",
-					offset, p+len+1);
+					(unsigned long)offset, p+len+1);
 			*count= -1;
 			free(name); name= NULL;
 			return name;
--- a/eperd/sslgetcert.c
+++ b/eperd/sslgetcert.c
@@ -182,7 +182,7 @@ static void buf_add(struct buf *buf, con
 	newbuf= malloc(maxsize);
 	if (!newbuf)
 	{
-		fprintf(stderr, "unable to allocate %ld bytes\n", maxsize);
+		fprintf(stderr, "unable to allocate %ld bytes\n", (long)maxsize);
 		exit(1);
 	}
 
--- a/libbb/atlas_bb64.c
+++ b/libbb/atlas_bb64.c
@@ -43,7 +43,7 @@ int buf_add(struct buf *buf, const void
 	newbuf= malloc(maxsize);
 	if (!newbuf)
 	{
-		fprintf(stderr, "unable to allocate %ld bytes\n", maxsize);
+		fprintf(stderr, "unable to allocate %ld bytes\n", (long)maxsize);
 		return (1);
 	}