~ubuntu-branches/ubuntu/precise/xdm/precise

« back to all changes in this revision

Viewing changes to debian/patches/00_warning_fixes.diff

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2011-01-30 00:53:09 UTC
  • mfrom: (9.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110130005309-30mjjyk7div7d494
Tags: 1:1.1.10-3ubuntu1
* Merge from debian unstable.  Remaining changes: (LP: #682196)
  - debian/{rules, xdm.install, local/ubuntu*}:
    + Add Ubuntu graphics and configure xdm to use them by default.
  - debian/patches/ubuntu_no_whiteglass.diff: Don't hardcode
    the default Xcursor theme to whiteglass. Use the Ubuntu
    default x-cursor-theme instead.
* debian/patches/ftbfs_binutils-gold.diff: Fix FTBFS with binutils-gold
  and ld --as-needed. (Closes: #556694)
* Dropped changes, no longer applicable:
  - debian/{xdm.postinst.in, xdm.postrm.in, xdm.preinst.in}

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Julien Cristau <jcristau@debian.org>
2
 
Date: Tue, 19 Aug 2008 22:43:47 +0200
3
 
Subject: Fix compiler warnings
4
 
 
5
 
* glibc wants _XOPEN_SOURCE_EXTENDED for vfork(), and
6
 
  _BSD_SOURCE for strcasecmp, so let's define _GNU_SOURCE and get them all.
7
 
* greeter/Login.c: gcc gets confused about lastspace being initialized
8
 
* greeter/greet.c: add const modifier to pam_message struct
9
 
* Also cast away a bunch of signed vs unsigned char* warnings.
10
 
 
11
 
diff --git a/configure.ac b/configure.ac
12
 
index 329c8e8..ff9cfb5 100644
13
 
--- a/configure.ac
14
 
+++ b/configure.ac
15
 
@@ -123,7 +123,7 @@ fi
16
 
 
17
 
 case $host_os in
18
 
     linux*|gnu*|*-gnu)
19
 
-        OS_CFLAGS="-D_XOPEN_SOURCE"
20
 
+        OS_CFLAGS="-D_GNU_SOURCE"
21
 
        SU="su"
22
 
         ;;
23
 
     darwin*)
24
 
diff --git a/genauth.c b/genauth.c
25
 
index 0b54b8d..245a63f 100644
26
 
--- a/genauth.c
27
 
+++ b/genauth.c
28
 
@@ -377,7 +377,7 @@ InitXdmcpWrapper (void)
29
 
 #endif    
30
 
     /*  Try some pseudo-random number genrator daemon next */
31
 
     if (prngdSocket != NULL || prngdPort != 0) {
32
 
-           if (get_prngd_bytes(tmpkey, sizeof(tmpkey), prngdPort, 
33
 
+           if (get_prngd_bytes((char *)tmpkey, sizeof(tmpkey), prngdPort, 
34
 
                    prngdSocket) == 0) {
35
 
                    tmpkey[0] = 0;
36
 
                    _XdmcpWrapperToOddParity(tmpkey, key);
37
 
diff --git a/greeter/Login.c b/greeter/Login.c
38
 
index a156762..741724d 100644
39
 
--- a/greeter/Login.c
40
 
+++ b/greeter/Login.c
41
 
@@ -73,6 +73,7 @@ from The Open Group.
42
 
 # include <stdio.h>
43
 
 # include <ctype.h>
44
 
 # include <time.h>
45
 
+# include <string.h>
46
 
 
47
 
 # include "dm.h"
48
 
 # include "dm_error.h"
49
 
@@ -602,7 +603,7 @@ RedrawFail (LoginWidget w)
50
 
            char *tempCopy = strdup(w->login.fail);
51
 
            if (tempCopy != NULL) {
52
 
                char *start, *next;
53
 
-               char lastspace;
54
 
+               char lastspace = '\0';
55
 
 
56
 
                y = PROMPT_Y(w,LAST_PROMPT) + (2 * PROMPT_Y_INC(w));
57
 
                
58
 
diff --git a/greeter/greet.c b/greeter/greet.c
59
 
index 0aabec7..27732ef 100644
60
 
--- a/greeter/greet.c
61
 
+++ b/greeter/greet.c
62
 
@@ -683,7 +683,7 @@ static int pamconv(int num_msg,
63
 
            "PAM_PROMPT_ECHO_OFF", "PAM_PROMPT_ECHO_ON",
64
 
            "PAM_ERROR_MSG", "PAM_TEXT_INFO" } ;
65
 
     
66
 
-    struct pam_message      *m;
67
 
+    const struct pam_message      *m;
68
 
     struct pam_response     *r;
69
 
 
70
 
     struct myconv_data     *d = (struct myconv_data *) appdata_ptr;
71
 
diff --git a/xdmauth.c b/xdmauth.c
72
 
index b54d5ce..fc47821 100644
73
 
--- a/xdmauth.c
74
 
+++ b/xdmauth.c
75
 
@@ -182,7 +182,9 @@ XdmGetXdmcpAuth (struct protoDisplay *pdpy,
76
 
     XdmPrintDataHex ("Accept packet auth", xdmcpauth->data, xdmcpauth->data_length);
77
 
     XdmPrintDataHex ("Auth file auth", fileauth->data, fileauth->data_length);
78
 
     /* encrypt the session key for its trip back to the server */
79
 
-    XdmcpWrap (xdmcpauth->data, (unsigned char *)&pdpy->key, xdmcpauth->data, 8);
80
 
+    XdmcpWrap ((unsigned char *)xdmcpauth->data,
81
 
+               (unsigned char *)&pdpy->key,
82
 
+               (unsigned char *)xdmcpauth->data, 8);
83
 
     pdpy->fileAuthorization = fileauth;
84
 
     pdpy->xdmcpAuthorization = xdmcpauth;
85
 
 }