Skip to content
Browse files

- kill many warnings appeared in 5.10

  • Loading branch information...
1 parent 5d23673 commit b96fcbf92b4d3f459a2c656657620142e2537711 dk committed
Showing with 55 additions and 50 deletions.
  1. +4 −4 Application.c
  2. +1 −0 Icon.c
  3. +2 −2 Image.c
  4. +1 −1 Prima/Gencls.pm
  5. +1 −0 Widget.c
  6. +4 −0 Window.c
  7. +1 −1 img/codec_Xpm.c
  8. +2 −2 img/codec_jpeg.c
  9. +3 −3 img/codec_png.c
  10. +23 −23 img/img.c
  11. +3 −4 include/apricot.h
  12. +9 −9 primguts.c
  13. +1 −1 unix/apc_event.c
View
8 Application.c
@@ -88,10 +88,10 @@ Application_init( Handle self, HV * profile)
/* store extra info */
{
HV * hv = ( HV *) SvRV( var-> mate);
- hv_store( hv, "PrinterClass", 12, newSVpv( pget_c( printerClass), 0), 0);
- hv_store( hv, "PrinterModule", 13, newSVpv( pget_c( printerModule), 0), 0);
- hv_store( hv, "HelpClass", 9, newSVpv( pget_c( helpClass), 0), 0);
- hv_store( hv, "HelpModule", 10, newSVpv( pget_c( helpModule), 0), 0);
+ (void) hv_store( hv, "PrinterClass", 12, newSVpv( pget_c( printerClass), 0), 0);
+ (void) hv_store( hv, "PrinterModule", 13, newSVpv( pget_c( printerModule), 0), 0);
+ (void) hv_store( hv, "HelpClass", 9, newSVpv( pget_c( helpClass), 0), 0);
+ (void) hv_store( hv, "HelpModule", 10, newSVpv( pget_c( helpModule), 0), 0);
}
{
View
1 Icon.c
@@ -67,6 +67,7 @@ produce_mask( Handle self)
} else if ( var-> autoMasking == amMaskIndex) {
if ( bpp > 8) return;
color = var-> maskIndex;
+ bzero( &rgbcolor, sizeof(rgbcolor));
}
if ( bpp == imMono) {
View
4 Image.c
@@ -583,7 +583,7 @@ img_perlio_seek( void * f, long offset, int whence)
#endif
}
-static unsigned long
+static long
img_perlio_tell( void * f)
{
#ifdef PerlIO
@@ -1269,7 +1269,7 @@ Image_dup( Handle self)
if ( hv_exists(( HV*)SvRV( var-> mate), "extras", 6)) {
SV ** sv = hv_fetch(( HV*)SvRV( var-> mate), "extras", 6, 0);
if ( sv && SvOK( *sv) && SvROK( *sv) && SvTYPE( SvRV( *sv)) == SVt_PVHV)
- hv_store(( HV*)SvRV( i-> mate), "extras", 6, newSVsv( *sv), 0);
+ (void) hv_store(( HV*)SvRV( i-> mate), "extras", 6, newSVsv( *sv), 0);
}
--SvREFCNT( SvRV( i-> mate));
View
2 Prima/Gencls.pm
@@ -2212,7 +2212,7 @@ CONTAINED_STRUCTURE
my $lNameLen = length $lName;
my $lType = @{$structs{$_}[TYPES]}[$k];
my $inter = type2sv( $lType, "strucRef-> $lName");
- print HEADER "\thv_store( $incHV, \"$lName\", $lNameLen, $inter, 0);\n";
+ print HEADER "\t(void) hv_store( $incHV, \"$lName\", $lNameLen, $inter, 0);\n";
}
print HEADER "\treturn newRV_noinc(( SV*) $incHV);\n";
print HEADER "}\n\n";
View
1 Widget.c
@@ -1404,6 +1404,7 @@ Widget_set( Handle self, HV * profile)
Bool exists[ 6];
int values[ 6];
+ bzero( values, sizeof(values));
if ( pexist( origin))
{
int set[2];
View
4 Window.c
@@ -477,6 +477,8 @@ void Window_set( Handle self, HV * profile)
o. x = set[0];
o. y = set[1];
io = 1;
+ } else {
+ o.x = o. y = 0;
}
if ( pexist( frameSize)) {
int set[2];
@@ -485,6 +487,8 @@ void Window_set( Handle self, HV * profile)
s. x = set[0];
s. y = set[1];
is = 1;
+ } else {
+ s.x = s. y = 0;
}
if ( is && io)
apc_widget_set_rect( self, o. x, o. y, s. x, s. y);
View
2 img/codec_Xpm.c
@@ -269,7 +269,7 @@ load( PImgCodec instance, PImgLoadFileInstance fi)
if ( j + 1 < e-> nlines)
sv_catpv( string, "\n");
}
- hv_store( hash, e-> name, strlen( e-> name), string, 0);
+ (void) hv_store( hash, e-> name, strlen( e-> name), string, 0);
}
pset_sv_noinc( extensions, newRV_noinc((SV*)hash));
}
View
4 img/codec_jpeg.c
@@ -263,8 +263,8 @@ load( PImgCodec instance, PImgLoadFileInstance fi)
if ( bpp == 8) bpp |= imGrayScale;
CImage( fi-> object)-> create_empty( fi-> object, 1, 1, bpp);
if ( fi-> noImageData) {
- hv_store( fi-> frameProperties, "width", 5, newSViv( l-> d. output_width), 0);
- hv_store( fi-> frameProperties, "height", 6, newSViv( l-> d. output_height), 0);
+ (void) hv_store( fi-> frameProperties, "width", 5, newSViv( l-> d. output_width), 0);
+ (void) hv_store( fi-> frameProperties, "height", 6, newSViv( l-> d. output_height), 0);
jpeg_abort_decompress( &l-> d);
return true;
}
View
6 img/codec_png.c
@@ -572,8 +572,8 @@ load( PImgCodec instance, PImgLoadFileInstance fi)
}
if ( fi-> noImageData) {
- hv_store( fi-> frameProperties, "width", 5, newSViv( width), 0);
- hv_store( fi-> frameProperties, "height", 6, newSViv( height), 0);
+ (void) hv_store( fi-> frameProperties, "width", 5, newSViv( width), 0);
+ (void) hv_store( fi-> frameProperties, "height", 6, newSViv( height), 0);
if ( fi-> loadExtras) { /* skip data and read info blocks */
for (pass = 0; pass < number_passes; pass++) {
int y;
@@ -746,7 +746,7 @@ load( PImgCodec instance, PImgLoadFileInstance fi)
if ( png_get_text( l-> png_ptr, l-> info_ptr, &tx, &ct)) {
HV * hash = newHV();
for ( i = 0; i < ct; i++, tx++)
- hv_store( hash, tx-> key, strlen( tx-> key), newSVpv( tx-> text, tx-> text_length), 0);
+ (void) hv_store( hash, tx-> key, strlen( tx-> key), newSVpv( tx-> text, tx-> text_length), 0);
pset_sv_noinc( text, newRV_noinc(( SV *) hash));
}
#endif
View
46 img/img.c
@@ -182,7 +182,7 @@ apc_img_profile_add( HV * to, HV * from, HV * keys)
continue;
holder = hv_fetch( from, key, keyLen, 0);
if ( holder)
- hv_store( to, key, keyLen, newSVsv( *holder), 0);
+ (void) hv_store( to, key, keyLen, newSVsv( *holder), 0);
}
}
@@ -452,7 +452,7 @@ apc_img_load( Handle self, char * fileName, PImgIORequest ioreq, HV * profile,
}
if ( fi. loadExtras && c-> info-> fileType)
- hv_store( fi. fileProperties, "codecID", 7, newSViv( codecID), 0);
+ (void) hv_store( fi. fileProperties, "codecID", 7, newSViv( codecID), 0);
/* loading */
for ( i = 0; i < fi. frameMapSize; i++) {
@@ -582,20 +582,20 @@ apc_img_load( Handle self, char * fileName, PImgIORequest ioreq, HV * profile,
apc_img_profile_add( extras, fi. fileProperties, fi. fileProperties);
apc_img_profile_add( extras, fi. frameProperties, fi. frameProperties);
if ( i == 0) firstObjectExtras = extras;
- hv_store(( HV* )SvRV((( PAnyObject) fi. object)-> mate), "extras", 6, newSVsv( sv), 0);
+ (void) hv_store(( HV* )SvRV((( PAnyObject) fi. object)-> mate), "extras", 6, newSVsv( sv), 0);
sv_free( sv);
} else if ( fi. noImageData) { /* no extras, report dimensions only */
HV * extras = newHV();
SV * sv = newRV_noinc(( SV *) extras), **item;
if (( item = hv_fetch( fi. frameProperties, "width", 5, 0)) && SvOK( *item))
- hv_store( extras, "width", 5, newSVsv( *item), 0);
+ (void) hv_store( extras, "width", 5, newSVsv( *item), 0);
else
- hv_store( extras, "width", 5, newSViv(PImage(fi.object)-> w), 0);
+ (void) hv_store( extras, "width", 5, newSViv(PImage(fi.object)-> w), 0);
if (( item = hv_fetch( fi. frameProperties, "height", 6, 0)) && SvOK( *item))
- hv_store( extras, "height", 6, newSVsv( *item), 0);
+ (void) hv_store( extras, "height", 6, newSVsv( *item), 0);
else
- hv_store( extras, "height", 6, newSViv(PImage(fi.object)-> h), 0);
- hv_store(( HV* )SvRV((( PAnyObject) fi. object)-> mate), "extras", 6, newSVsv( sv), 0);
+ (void) hv_store( extras, "height", 6, newSViv(PImage(fi.object)-> h), 0);
+ (void) hv_store(( HV* )SvRV((( PAnyObject) fi. object)-> mate), "extras", 6, newSVsv( sv), 0);
sv_free( sv);
}
@@ -613,7 +613,7 @@ apc_img_load( Handle self, char * fileName, PImgIORequest ioreq, HV * profile,
SV * sv = newRV_noinc(( SV *) extras);
apc_img_profile_add( extras, fi. fileProperties, fi. fileProperties);
firstObjectExtras = extras;
- hv_store(( HV* )SvRV((( PAnyObject) self)-> mate), "extras", 6, newSVsv( sv), 0);
+ (void) hv_store(( HV* )SvRV((( PAnyObject) self)-> mate), "extras", 6, newSVsv( sv), 0);
sv_free( sv);
}
@@ -624,7 +624,7 @@ EXIT_NOW:;
fi. frameCount = apc_img_frame_count( fileName, ioreq);
}
if ( firstObjectExtras)
- hv_store( firstObjectExtras, "frames", 6, newSViv( fi. frameCount), 0);
+ (void) hv_store( firstObjectExtras, "frames", 6, newSViv( fi. frameCount), 0);
if ( err && ret)
list_add( ret, nilHandle); /* indicate the error */
if ( def)
@@ -1233,7 +1233,7 @@ static AV * fill_plist( char * key, char ** list, HV * profile)
av_push( av, newSVpv( *list, 0));
list++;
}
- hv_store( profile, key, strlen( key), newRV_noinc(( SV *) av), 0);
+ (void) hv_store( profile, key, strlen( key), newRV_noinc(( SV *) av), 0);
return av;
}
@@ -1245,7 +1245,7 @@ static void fill_ilist( char * key, int * list, HV * profile)
av_push( av, newSViv( *list));
list++;
}
- hv_store( profile, key, strlen( key), newRV_noinc(( SV *) av), 0);
+ (void) hv_store( profile, key, strlen( key), newRV_noinc(( SV *) av), 0);
}
@@ -1288,15 +1288,15 @@ apc_img_info2hash( PImgCodec codec)
if ( c-> IOFlags & ( IMG_LOAD_FROM_FILE|IMG_LOAD_FROM_STREAM)) {
hv = codec-> vmt-> load_defaults( codec);
if ( c-> IOFlags & IMG_LOAD_MULTIFRAME) {
- hv_store( hv, "index", 5, newSViv(0), 0);
- hv_store( hv, "map", 3, newSVsv(nilSV), 0);
- hv_store( hv, "loadAll", 7, newSViv(0), 0);
- hv_store( hv, "wantFrames", 10, newSViv(0), 0);
+ (void) hv_store( hv, "index", 5, newSViv(0), 0);
+ (void) hv_store( hv, "map", 3, newSVsv(nilSV), 0);
+ (void) hv_store( hv, "loadAll", 7, newSViv(0), 0);
+ (void) hv_store( hv, "wantFrames", 10, newSViv(0), 0);
}
- hv_store( hv, "loadExtras", 10, newSViv(0), 0);
- hv_store( hv, "noImageData", 11, newSViv(0), 0);
- hv_store( hv, "iconUnmask", 10, newSViv(0), 0);
- hv_store( hv, "className", 9, newSVpv("Prima::Image", 0), 0);
+ (void) hv_store( hv, "loadExtras", 10, newSViv(0), 0);
+ (void) hv_store( hv, "noImageData", 11, newSViv(0), 0);
+ (void) hv_store( hv, "iconUnmask", 10, newSViv(0), 0);
+ (void) hv_store( hv, "className", 9, newSVpv("Prima::Image", 0), 0);
} else
hv = newHV();
pset_sv_noinc( loadInput, newRV_noinc(( SV *) hv));
@@ -1313,9 +1313,9 @@ apc_img_info2hash( PImgCodec codec)
if ( c-> IOFlags & ( IMG_SAVE_TO_FILE|IMG_SAVE_TO_STREAM)) {
hv = codec-> vmt-> save_defaults( codec);
if ( c-> IOFlags & IMG_SAVE_MULTIFRAME)
- hv_store( hv, "append", 6, newSViv(0), 0);
- hv_store( hv, "autoConvert", 10, newSViv(1), 0);
- hv_store( hv, "codecID", 7, newSVsv( nilSV), 0);
+ (void) hv_store( hv, "append", 6, newSViv(0), 0);
+ (void) hv_store( hv, "autoConvert", 10, newSViv(1), 0);
+ (void) hv_store( hv, "codecID", 7, newSVsv( nilSV), 0);
} else
hv = newHV();
pset_sv_noinc( saveInput, newRV_noinc(( SV *) hv));
View
7 include/apricot.h
@@ -247,9 +247,8 @@ extern "C" {
#ifndef PTR2IV
#define PTR2IV(x) ((IV)(x))
#endif
-#ifndef INT2PTR
+#undef INT2PTR
#define INT2PTR(type,x) ((type)((UV)x))
-#endif
#ifndef SvPV_nolen
#define SvPV_nolen(_sv) SvPV(_sv,na)
@@ -1308,7 +1307,7 @@ SvBOOL( SV *sv)
#endif
#define pexist( key) hv_exists( profile, # key, strlen( #key))
-#define pdelete( key) hv_delete( profile, # key, strlen( #key), G_DISCARD)
+#define pdelete( key) (void) hv_delete( profile, # key, strlen( #key), G_DISCARD)
#define dPROFILE SV ** temporary_prf_Sv
#define pget_sv( key) ((( temporary_prf_Sv = hv_fetch( profile, # key, strlen( # key), 0)) == nil) ? croak( "Panic: bad profile key (``%s'') requested in ``%s'', line %d\n", # key, __FILE__, __LINE__ ), &sv_undef : *temporary_prf_Sv)
#define pget_i( key) ( pget_sv( key), SvIV( *temporary_prf_Sv))
@@ -1317,7 +1316,7 @@ SvBOOL( SV *sv)
#define pget_H( key) gimme_the_mate( pget_sv( key))
#define pget_B( key) ( SvTRUE( pget_sv( key)))
-#define pset_sv_noinc( key, value) hv_store( profile, # key, strlen( # key), value, 0);
+#define pset_sv_noinc( key, value) (void)hv_store( profile, # key, strlen( # key), value, 0)
#define pset_sv( key, value) pset_sv_noinc( key, newSVsv( value))
#define pset_i( key, value) pset_sv_noinc( key, newSViv( value))
#define pset_f( key, value) pset_sv_noinc( key, newSVnv( value))
View
18 primguts.c
@@ -334,7 +334,7 @@ create_mate( SV *perlObject)
else
{
/* another scheme, uses hash slot */
- hv_store( (HV*)SvRV( perlObject), "__CMATE__", 9, newSViv( PTR2IV(object)), 0);
+ (void) hv_store( (HV*)SvRV( perlObject), "__CMATE__", 9, newSViv( PTR2IV(object)), 0);
}
/* extra check */
@@ -1048,7 +1048,7 @@ parse_hv( I32 ax, SV **sp, I32 items, SV **mark, int expected, const char *metho
he = hv_store_ent( hv, ST( i), newSVsv( ST( i+1)), 0);
av_push( order, newSVsv( ST( i)));
}
- hv_store( hv, "__ORDER__", 9, newRV_noinc((SV *)order), 0);
+ (void) hv_store( hv, "__ORDER__", 9, newRV_noinc((SV *)order), 0);
return hv;
}
@@ -1170,10 +1170,10 @@ pop_hv_for_REDEFINED( SV **sp, int returned, HV *hv, int expected)
SV *k = POPs;
if (!( SvPOK( k) && ( !SvROK( k))))
croak( "GUTS013: Illegal value for a profile key passed");
- hv_store_ent( hv, k, newSVsv( v), 0);
+ (void) hv_store_ent( hv, k, newSVsv( v), 0);
av_push( order, newSVsv( k));
}
- hv_store( hv, "__ORDER__", 9, newRV_noinc((SV *)order), 0);
+ (void) hv_store( hv, "__ORDER__", 9, newRV_noinc((SV *)order), 0);
return expected;
}
@@ -1487,13 +1487,13 @@ create_object( const char *objClass, const char *types, ...)
switch (*types)
{
case 'i':
- hv_store( profile, s, strlen( s), newSViv(va_arg(params, int)), 0);
+ (void) hv_store( profile, s, strlen( s), newSViv(va_arg(params, int)), 0);
break;
case 's':
- hv_store( profile, s, strlen( s), newSVpv(va_arg(params, char *),0), 0);
+ (void) hv_store( profile, s, strlen( s), newSVpv(va_arg(params, char *),0), 0);
break;
case 'n':
- hv_store( profile, s, strlen( s), newSVnv(va_arg(params, double)), 0);
+ (void) hv_store( profile, s, strlen( s), newSVnv(va_arg(params, double)), 0);
break;
default:
croak( "GUTS014: create_object: illegal parameter type");
@@ -1755,7 +1755,7 @@ hash_delete( PHash h, const void *key, int keyLen, Bool kill)
if ( !he) return nil;
val = HeVAL( he);
HeVAL( he) = &sv_undef;
- hv_delete_ent( h, ksv, G_DISCARD, 0);
+ (void) hv_delete_ent( h, ksv, G_DISCARD, 0);
if ( kill) {
free( val);
return nil;
@@ -1770,7 +1770,7 @@ hash_store( PHash h, const void *key, int keyLen, void *val)
ksv_check;
if ( he) {
HeVAL( he) = &sv_undef;
- hv_delete_ent( h, ksv, G_DISCARD, 0);
+ (void) hv_delete_ent( h, ksv, G_DISCARD, 0);
}
he = hv_store_ent( h, ksv, &sv_undef, 0);
HeVAL( he) = ( SV *) val;
View
2 unix/apc_event.c
@@ -954,7 +954,7 @@ prima_handle_event( XEvent *ev, XEvent *next_event)
Event e, secondary;
PDrawableSysData selfxx;
XButtonEvent *bev;
- KeySym keysym;
+ KeySym keysym = 0;
int cmd;
XCHECKPOINT;

0 comments on commit b96fcbf

Please sign in to comment.
Something went wrong with that request. Please try again.