Skip to content

Commit

Permalink
Fix for redundant sprintf arg warngings in perl 5.22
Browse files Browse the repository at this point in the history
Fixes new redundant sprintf arguments warnings in perl 5.22.

Issue #134.
  • Loading branch information
jmcnamara committed Aug 5, 2015
1 parent a55f88b commit b133391
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Excel/Writer/XLSX/Chart.pm
Expand Up @@ -995,7 +995,7 @@ sub _get_palette_color {
# Palette is passed in from the Workbook class.
my @rgb = @{ $palette->[$index] };

return sprintf "%02X%02X%02X", @rgb;
return sprintf "%02X%02X%02X", @rgb[0, 1, 2];
}


Expand Down
2 changes: 1 addition & 1 deletion lib/Excel/Writer/XLSX/Package/Styles.pm
Expand Up @@ -162,7 +162,7 @@ sub _get_palette_color {
# Palette is passed in from the Workbook class.
my @rgb = @{ $palette->[$index] };

return sprintf "FF%02X%02X%02X", @rgb;
return sprintf "FF%02X%02X%02X", @rgb[0, 1, 2];
}


Expand Down
2 changes: 1 addition & 1 deletion lib/Excel/Writer/XLSX/Shape.pm
Expand Up @@ -275,7 +275,7 @@ sub _get_palette_color {
# Palette is passed in from the Workbook class.
my @rgb = @{ $palette->[$index] };

return sprintf "%02X%02X%02X", @rgb;
return sprintf "%02X%02X%02X", @rgb[0, 1, 2];
}


Expand Down
6 changes: 3 additions & 3 deletions lib/Excel/Writer/XLSX/Worksheet.pm
Expand Up @@ -3837,7 +3837,7 @@ sub conditional_formatting {
elsif ( $param->{criteria} eq 'thisMonth' ) {
$param->{formula} =
sprintf 'AND(MONTH(%s)=MONTH(TODAY()),YEAR(%s)=YEAR(TODAY()))',
$start_cell, $start_cell, $start_cell;
$start_cell, $start_cell;
}
elsif ( $param->{criteria} eq 'nextMonth' ) {
$param->{formula} =
Expand Down Expand Up @@ -4529,7 +4529,7 @@ sub _get_palette_color {
# Palette is passed in from the Workbook class.
my @rgb = @{ $palette->[$index] };
return sprintf "FF%02X%02X%02X", @rgb;
return sprintf "FF%02X%02X%02X", @rgb[0, 1, 2];
}
Expand Down Expand Up @@ -5841,7 +5841,7 @@ sub _comment_params {
# Get the RGB color from the palette.
my @rgb = @{ $palette->[ $color_id - 8 ] };
my $rgb_color = sprintf "%02x%02x%02x", @rgb;
my $rgb_color = sprintf "%02x%02x%02x", @rgb[0, 1, 2];
# Minor modification to allow comparison testing. Change RGB colors
# from long format, ffcc00 to short format fc0 used by VML.
Expand Down

0 comments on commit b133391

Please sign in to comment.