1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/syck: suppress warnings more.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-07-22 21:12:00 +00:00
parent e35550c3e7
commit 9049de7875
9 changed files with 23 additions and 24 deletions

View file

@ -1,3 +1,7 @@
Wed Jul 23 06:11:58 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/syck: suppress warnings more.
Wed Jul 23 03:19:31 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/nkf/nkf-utf8/nkf.c (struct input_code.name, input_codename):

View file

@ -164,7 +164,7 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
#line 165 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
unsigned int yyaccept = 0;
goto yy0;
++YYCURSOR;
yy0:
@ -542,7 +542,7 @@ Directive:
#line 543 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
unsigned int yyaccept = 0;
goto yy45;
++YYCURSOR;
yy45:

View file

@ -284,7 +284,7 @@ void
syck_emitter_write( SyckEmitter *e, const char *str, long len )
{
long at;
ASSERT( str != NULL )
ASSERT( str != NULL );
if ( e->buffer == NULL )
{
syck_emitter_clear( e );

View file

@ -144,7 +144,7 @@ syck_add_transfer( char *uri, SyckNode *n, int taguri )
}
char *
syck_xprivate( char *type_id, int type_len )
syck_xprivate( const char *type_id, int type_len )
{
char *uri = S_ALLOC_N( char, type_len + 14 );
uri[0] = '\0';

View file

@ -47,7 +47,7 @@ try_tag_implicit( SyckNode *n, int taguri )
const char *
syck_match_implicit( const char *str, size_t len )
{
const char *cursor, *limit, *marker;
const char *cursor, *limit, *marker = 0;
cursor = str;
limit = str + len;
@ -1609,9 +1609,9 @@ syck_tagcmp( const char *tag1, const char *tag2 )
}
char *
syck_type_id_to_uri( char *type_id )
syck_type_id_to_uri( const char *type_id )
{
char *cursor, *limit, *marker;
const char *cursor, *limit, *marker;
cursor = type_id;
limit = type_id + strlen( type_id );
@ -1620,7 +1620,7 @@ syck_type_id_to_uri( char *type_id )
#line 1620 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
unsigned int yyaccept = 0;
goto yy202;
++YYCURSOR;
yy202:

View file

@ -103,7 +103,7 @@ rb_syck_compile(VALUE self, VALUE port)
int taint;
char *ret;
VALUE bc;
bytestring_t *sav;
bytestring_t *sav = NULL;
void *data;
SyckParser *parser = syck_new_parser();
@ -2055,9 +2055,7 @@ VALUE
syck_out_scalar(int argc, VALUE *argv, VALUE self)
{
VALUE type_id, str, style, scalar;
if (rb_scan_args(argc, argv, "21", &type_id, &str, &style) == 2) {
style = Qnil;
}
rb_scan_args(argc, argv, "21", &type_id, &str, &style);
scalar = rb_funcall( cScalar, s_new, 3, type_id, str, style );
syck_out_mark( rb_ivar_get( self, s_emitter ), scalar );
return scalar;

View file

@ -18,11 +18,11 @@ void syck_parser_pop_level( SyckParser * );
* Custom assert
*/
void
syck_assert( char *file_name, unsigned line_num )
syck_assert( const char *file_name, unsigned line_num, const char *expr )
{
fflush( NULL );
fprintf( stderr, "\nAssertion failed: %s, line %u\n",
file_name, line_num );
fprintf( stderr, "\nAssertion failed: %s, line %u: %s\n",
file_name, line_num, expr );
fflush( stderr );
abort();
}

View file

@ -32,14 +32,11 @@ extern "C" {
#endif
#if DEBUG
void syck_assert( char *, unsigned );
void syck_assert( const char *, unsigned, const char * );
# define ASSERT(f) \
if ( f ) \
{} \
else \
syck_assert( __FILE__, __LINE__ )
(( f ) ? (void)0 syck_assert( __FILE__, __LINE__, #f )
#else
# define ASSERT(f)
# define ASSERT(f) ((void)0)
#endif
#ifndef NULL
@ -345,13 +342,13 @@ SyckNode *syck_hdlr_add_anchor( SyckParser *, char *, SyckNode * );
void syck_hdlr_remove_anchor( SyckParser *, char * );
SyckNode *syck_hdlr_get_anchor( SyckParser *, char * );
void syck_add_transfer( char *, SyckNode *, int );
char *syck_xprivate( char *, int );
char *syck_xprivate( const char *, int );
char *syck_taguri( const char *, const char *, int );
int syck_tagcmp( const char *, const char * );
int syck_add_sym( SyckParser *, void * );
int syck_lookup_sym( SyckParser *, SYMID, void ** );
int syck_try_implicit( SyckNode * );
char *syck_type_id_to_uri( char * );
char *syck_type_id_to_uri( const char * );
void try_tag_implicit( SyckNode *, int );
const char *syck_match_implicit( const char *, size_t );

View file

@ -1116,7 +1116,7 @@ Directive:
#line 1117 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
unsigned int yyaccept = 0;
goto yy94;
++YYCURSOR;
yy94: