diff --git a/vfs/ChangeLog b/vfs/ChangeLog index bc1050e38..b4368fb57 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,8 @@ +2005-07-31 Roland Illig + + * samba: Added some const qualifiers to reduce the number of gcc + warnings. + 2005-07-25 Pavel Roskin * extfs/urar.in: Remove month translation and year windowing - diff --git a/vfs/samba/include/proto.h b/vfs/samba/include/proto.h index 9770501e8..7b68a66b2 100644 --- a/vfs/samba/include/proto.h +++ b/vfs/samba/include/proto.h @@ -50,7 +50,7 @@ int get_netmask(struct in_addr *ipaddr, struct in_addr *nmask); /* The following definitions come from lib/slprintf.c */ -int vslprintf(char *str, int n, char *format, va_list ap); +int vslprintf(char *str, int n, const char *format, va_list ap); /* The following definitions come from lib/system.c */ diff --git a/vfs/samba/include/smb.h b/vfs/samba/include/smb.h index ca757f16a..2c44b4c7d 100644 --- a/vfs/samba/include/smb.h +++ b/vfs/samba/include/smb.h @@ -74,7 +74,7 @@ int Debug1( char *, ... ) __attribute__ ((format (printf, 1, 2))) #endif ; -BOOL dbgtext( char *, ... ) +BOOL dbgtext( const char *, ... ) #ifdef __GNUC__ __attribute__ ((format (printf, 1, 2))) #endif @@ -865,12 +865,12 @@ typedef enum struct enum_list { int value; - char *name; + const char *name; }; struct parm_struct { - char *label; + const char *label; parm_type type; parm_class class; void *ptr; @@ -1341,7 +1341,7 @@ struct bitmap { #define ERRCMD 0xFF /* Command was not in the "SMB" format. */ #ifdef HAVE_STDARG_H -int slprintf(char *str, int n, char *format, ...) +int slprintf(char *str, int n, const char *format, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 3, 4))) #endif diff --git a/vfs/samba/lib/debug.c b/vfs/samba/lib/debug.c index 98e4d2932..648447ab8 100644 --- a/vfs/samba/lib/debug.c +++ b/vfs/samba/lib/debug.c @@ -347,7 +347,7 @@ BOOL dbghdr( int level, const char *file, const char *func, int line ) * ************************************************************************** ** */ #ifdef HAVE_STDARG_H - BOOL dbgtext( char *format_str, ... ) + BOOL dbgtext( const char *format_str, ... ) { va_list ap; pstring msgbuf; diff --git a/vfs/samba/lib/slprintf.c b/vfs/samba/lib/slprintf.c index c5d34284e..d496d5309 100644 --- a/vfs/samba/lib/slprintf.c +++ b/vfs/samba/lib/slprintf.c @@ -27,7 +27,7 @@ extern int DEBUGLEVEL; /* this is like vsnprintf but the 'n' limit does not include the terminating null. So if you have a 1024 byte buffer then pass 1023 for n */ -int vslprintf(char *str, int n, char *format, va_list ap) +int vslprintf(char *str, int n, const char *format, va_list ap) { int ret = vsnprintf(str, n, format, ap); if (ret > n || ret < 0) { @@ -39,7 +39,7 @@ int vslprintf(char *str, int n, char *format, va_list ap) } #ifdef HAVE_STDARG_H - int slprintf(char *str, int n, char *format, ...) + int slprintf(char *str, int n, const char *format, ...) { #else int slprintf(va_alist) diff --git a/vfs/samba/libsmb/smberr.c b/vfs/samba/libsmb/smberr.c index 3cef8f869..1c723348d 100644 --- a/vfs/samba/libsmb/smberr.c +++ b/vfs/samba/libsmb/smberr.c @@ -29,9 +29,9 @@ extern int DEBUGLEVEL; typedef struct { - char *name; + const char *name; int code; - char *message; + const char *message; } err_code_struct; /* Dos Error Messages */ @@ -129,7 +129,7 @@ static err_code_struct const hard_msgs[] = { struct { int code; - char *class; + const char *class; err_code_struct const *err_msgs; } const err_classes [] = { {0,"SUCCESS",NULL},