screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] Introduction and little anti-warning patch


From: Felipe Tanus
Subject: [screen-devel] Introduction and little anti-warning patch
Date: Sat, 31 Oct 2009 01:39:58 -0300

Hello people,

       Since I'm new to the list, I  would like to introduct myself.
I'm fotanus, a linux user, developer, and I like to spend some of my
free time coding. English is not my native language, so, sorry if my
mails are hard to read.
       I started to look at screen this night, and i'm a little bored
for warnings; Ok, I may be nuts, but i don't like warnings at all :)
So, i'm sending this little patch that do some casting stuff to avoid
the warnings. Since i'm just taking a peek in the code right now, I
can't contribute with any more, but soon i hope to give a hand with
that bugs on the tracker :)

====== code =====




diff -rupN src/acls.c new/acls.c
--- src/acls.c  2009-11-01 02:21:45.730094783 -0300
+++ new/acls.c  2009-11-01 02:23:36.664143458 -0300
@@ -546,7 +546,7 @@ char *name, *pw1, *pw2;
       if (pw2 && *pw2 && *pw2 != '\377')       /* provided a system password */
         {
          if (!*pass ||                         /* but needed none */
-             strcmp(crypt(pw2, pass), pass))
+             strcmp((char *)crypt(pw2, pass), pass))
            {
              debug("System password mismatch\n");
              sorry++;
@@ -559,7 +559,7 @@ char *name, *pw1, *pw2;
       if (pw1 && *pw1 && *pw1 != '\377')       /* provided a screen password */
        {
          if (!*u->u_password ||                /* but needed none */
-             strcmp(crypt(pw1, u->u_password), u->u_password))
+             strcmp((char *)crypt(pw1, u->u_password), u->u_password))
            {
              debug("screen password mismatch\n");
               sorry++;
diff -rupN src/attacher.c new/attacher.c
--- src/attacher.c      2009-11-01 02:21:45.733426543 -0300
+++ new/attacher.c      2009-11-01 02:24:27.296966381 -0300
@@ -866,7 +866,7 @@ screen_builtin_lck()
       salt[0] = 'A' + (int)(time(0) % 26);
       salt[1] = 'A' + (int)((time(0) >> 6) % 26);
       salt[2] = 0;
-      pass = crypt(mypass, salt);
+      pass = (char *)crypt(mypass, salt);
       pass = ppp->pw_passwd = SaveStr(pass);
     }
 #endif
@@ -909,7 +909,7 @@ screen_builtin_lck()
       if (pam_error == PAM_SUCCESS)
        break;
 #else
-      if (!strncmp(crypt(cp1, pass), pass, strlen(pass)))
+      if (!strncmp((char *)crypt(cp1, pass), pass, strlen(pass)))
        break;
 #endif
       debug("screen_builtin_lck: NO!!!!!\n");
diff -rupN src/process.c new/process.c
--- src/process.c       2009-11-01 02:21:45.753426386 -0300
+++ new/process.c       2009-11-01 02:25:23.676738277 -0300
@@ -6332,7 +6332,7 @@ char *data;
       for (st = 0; st < 2; st++)
        salt[st] = 'A' + (int)((time(0) >> 6 * st) % 26);
       salt[2] = 0;
-      buf = crypt(u->u_password, salt);
+      buf = (char *)crypt(u->u_password, salt);
       bzero(u->u_password, strlen(u->u_password));
       free((char *)u->u_password);
       u->u_password = SaveStr(buf);



====/code=========

i'm also send it attached .

[]'s


-- 
Felipe de Oliveira Tanus
E-mail: address@hidden
Blog: http://www.itlife.com.br
Site: http://www.inf.ufrgs.br/~fotanus/
-----
"All we have to decide is what to do with the time that is given us." - Gandalf

Attachment: remove_warnings.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]