[gs-cvs] rev 6999 - trunk/gs/src
leonardo at ghostscript.com
leonardo at ghostscript.com
Fri Aug 18 00:57:00 PDT 2006
Author: leonardo
Date: 2006-08-18 00:56:59 -0700 (Fri, 18 Aug 2006)
New Revision: 6999
Modified:
trunk/gs/src/fapiufst.c
trunk/gs/src/gslibctx.c
trunk/gs/src/gslibctx.h
trunk/gs/src/strmio.c
Log:
Fix : MSVC8 compiler warnings.
DETAILS :
gs_lib_ctx_get_non_gc_memory_t is called in sfopen and the result is passed to
file_open_stream, which assumes non-const.
A better fix would be to assume gs_memory_te to be const for allocators
and for functions and for structures which pass it transparently to allocators.
Actually allocators modify only a subclass data,
so that 'const' may be safely broken inside the allocator method
when casting to the subclass.
The garbager modifies exactly gs_memory_t pointers,
but it is NOT called from allocators.
The "better" fix requires changes to lots of modules,
so we choose the easiest fix for now.
Minor changes :
1. Unuseful variable in fapiufst.c unintentiopnally contributed with the last patch.
2. "const char *" to "const byte *" warning in strmio.c .
EXPECTED DIFFERENCES :
None.
Modified: trunk/gs/src/fapiufst.c
===================================================================
--- trunk/gs/src/fapiufst.c 2006-08-18 04:42:11 UTC (rev 6998)
+++ trunk/gs/src/fapiufst.c 2006-08-18 07:56:59 UTC (rev 6999)
@@ -38,8 +38,6 @@
typedef struct fapi_ufst_server_s fapi_ufst_server;
-static SW16 static_fcHandle[3] = { 0, 0, 0 };
-
#if UFST_REENTRANT
#define FSA_FROM_SERVER IF_STATE *pIFS = &r->IFS
#else
Modified: trunk/gs/src/gslibctx.c
===================================================================
--- trunk/gs/src/gslibctx.c 2006-08-18 04:42:11 UTC (rev 6998)
+++ trunk/gs/src/gslibctx.c 2006-08-18 07:56:59 UTC (rev 6999)
@@ -35,7 +35,7 @@
static gs_memory_t *mem_err_print = NULL;
-const gs_memory_t *
+gs_memory_t *
gs_lib_ctx_get_non_gc_memory_t()
{
return mem_err_print ? mem_err_print->non_gc_memory : NULL;
Modified: trunk/gs/src/gslibctx.h
===================================================================
--- trunk/gs/src/gslibctx.h 2006-08-18 04:42:11 UTC (rev 6998)
+++ trunk/gs/src/gslibctx.h 2006-08-18 07:56:59 UTC (rev 6999)
@@ -59,6 +59,6 @@
/* HACK to get at non garbage collection memory pointer
*
*/
-const gs_memory_t * gs_lib_ctx_get_non_gc_memory_t(void);
+gs_memory_t * gs_lib_ctx_get_non_gc_memory_t(void);
#endif /* GSLIBCTX_H */
Modified: trunk/gs/src/strmio.c
===================================================================
--- trunk/gs/src/strmio.c 2006-08-18 04:42:11 UTC (rev 6998)
+++ trunk/gs/src/strmio.c 2006-08-18 07:56:59 UTC (rev 6999)
@@ -63,7 +63,7 @@
code = open_file(pfn.iodev, pfn.fname, pfn.len, mode, &s, mem);
if (code < 0)
return NULL;
- code = ssetfilename(s, path, strlen(path));
+ code = ssetfilename(s, (const byte *)path, strlen(path));
if (code < 0) {
/* Only error is e_VMerror */
sclose(s);
More information about the gs-cvs
mailing list