wldap32: Write-strings warnings fix (Try 2)

Andrew Talbot Andrew.Talbot at talbotville.com
Fri Aug 11 07:42:06 CDT 2006


This time, recognising that ber_printf() is in the SDK.
---
Changelog:
    wldap32: Write-strings warnings fix.

diff -urN a/dlls/wldap32/ber.c b/dlls/wldap32/ber.c
--- a/dlls/wldap32/ber.c	2006-07-16 15:08:30.000000000 +0100
+++ b/dlls/wldap32/ber.c	2006-08-11 13:25:36.000000000 +0100
@@ -372,8 +372,9 @@
         case 'X':
             {
                 char *str = va_arg( list, char * );
+                static char bee[] = "B";
                 int len = va_arg( list, int );
-                ret = ber_printf( berelement, "B" /* 'X' is deprecated */, str, len );
+                ret = ber_printf( berelement, bee /* 'X' is deprecated */, str, len );
                 break;
             }
         case 'n':
diff -urN a/dlls/wldap32/init.c b/dlls/wldap32/init.c
--- a/dlls/wldap32/init.c	2006-06-13 12:00:21.000000000 +0100
+++ b/dlls/wldap32/init.c	2006-08-10 23:55:51.000000000 +0100
@@ -132,7 +132,7 @@
  * Prepend a given scheme and append a given portnumber to each hostname
  * if necessary.
  */
-static char *join_hostnames( char *scheme, char **hostnames, ULONG portnumber )
+static char *join_hostnames( const char *scheme, char **hostnames, ULONG portnumber )
 {
     char *res, *p, *q, **v;
     unsigned int i = 0, size = 0; 
@@ -196,7 +196,7 @@
     return res;
 }
 
-static char *urlify_hostnames( char *scheme, char *hostnames, ULONG port )
+static char *urlify_hostnames( const char *scheme, char *hostnames, ULONG port )
 {
     char *url = NULL, **strarray;
 



More information about the wine-patches mailing list