apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <madhusudan_mathiha...@hp.com>
Subject RE: apr_xlate_conv_buffer
Date Tue, 06 Nov 2001 19:56:09 GMT
Can somebody pl. acknowledge - if there's something wrong that I may be
doing here OR is it a known thing.. I'm really concerned when my compiler
emits out warnings..


-----Original Message-----
Sent: Monday, November 05, 2001 6:10 PM
To: 'dev@httpd.apache.org'
Subject: apr_xlate_conv_buffer

	I was just wondering if srclib/apr/i18n/unix/xlate.c :
apr_xlate_conv_buffer() is supposed to accept "char *inbuf" or "unsigned
char *inbuf".. It's being used differently in lotsa places - and it shows up
as a warning when apr_md5.c is being compiled.. Do you guys think it's worth
applying this patch ?.. I feel it's safer to do this (it atleast doesn't
harm if the buffer actually contains unsigned char data).. 

Ofcourse, this patch is not complete (it doesn't fully take care of
converting all the local buffers in apr_xlate_conf_buffer())..


Index: apr_xlate.h
RCS file: /home/cvspublic/apr/include/apr_xlate.h,v
retrieving revision 1.16
diff -u -r1.16 apr_xlate.h
--- apr_xlate.h 2001/08/24 17:55:45     1.16
+++ apr_xlate.h 2001/11/06 01:46:56
@@ -144,9 +144,9 @@
  *                      Output: the amount of the output buffer not yet
 APR_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset, 
-                                                const char *inbuf, 
+                                                const unsigned char *inbuf,

                                                 apr_size_t *inbytes_left, 
-                                                char *outbuf,
+                                                unsigned char *outbuf,
                                                 apr_size_t *outbytes_left);
 /* @see apr_file_io.h the comment in apr_file_io.h about this hack */

Index: xlate.c
RCS file: /home/cvspublic/apr/i18n/unix/xlate.c,v
retrieving revision 1.23
diff -u -r1.23 xlate.c
--- xlate.c     2001/02/25 20:46:49     1.23
+++ xlate.c     2001/11/06 01:47:41
@@ -282,8 +282,10 @@
     return APR_SUCCESS;
-apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, const char *inbuf,
-                                   apr_size_t *inbytes_left, char *outbuf,
+apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset,
+                                   const unsigned char *inbuf,
+                                   apr_size_t *inbytes_left,
+                                   unsigned char *outbuf,
                                    apr_size_t *outbytes_left)
     apr_status_t status = APR_SUCCESS;

View raw message