[PATCH:xscope 6/6] Add casts to fix signedness change warnings.

Thomas Klausner tk at giga.or.at
Tue Dec 7 07:59:18 UTC 2021


---
 scope.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scope.c b/scope.c
index 88fae33..c07274a 100644
--- a/scope.c
+++ b/scope.c
@@ -1384,15 +1384,15 @@ DataFromRawFile(FD rawfd)
         /* If we already read a line last time, process it first,
            else get the next line for processing */
         if (FDinfo[rawfd].bufcount == 0) {
-            if (fgets(FDinfo[rawfd].buffer, BUFFER_SIZE, raw) == NULL) {
+            if (fgets((char *)FDinfo[rawfd].buffer, BUFFER_SIZE, raw) == NULL) {
                 CloseConnection(rawfd);
                 exit(0);
             }
-            FDinfo[rawfd].bufcount = strlen(FDinfo[rawfd].buffer);
+            FDinfo[rawfd].bufcount = strlen((char *)FDinfo[rawfd].buffer);
             debug(16, (stderr, "raw input = %s", FDinfo[rawfd].buffer));
         }
 
-        in = FDinfo[rawfd].buffer;
+        in = (char *)FDinfo[rawfd].buffer;
 
         /* lines starting with space indicate change of sender */
         if (isspace(*(unsigned char *)in)) {
@@ -1480,7 +1480,7 @@ DataFromRawFile(FD rawfd)
                     in = strstr(in, "(fd ");
                     if (in == NULL) {
                         warn("Did not find fd string in input entry");
-                        warn(FDinfo[rawfd].buffer);
+                        warn((char *)FDinfo[rawfd].buffer);
                         FDinfo[rawfd].bufcount = 0;
                         continue;
                     }
-- 
2.34.1



More information about the xorg-devel mailing list