Unified · Split
| @@ -48,13 +48,13 @@ static const OptionDef options[]; · 47 unmodified lines | |||
| 48 | static const char *input_filename; | 48 | static const char *input_filename; |
| 49 | static AVInputFormat *iformat = NULL; | 49 | static AVInputFormat *iformat = NULL; |
| 50 | 50 | ||
| 51 | static const char *binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" }; | 51 | static const char *const binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" }; |
| 52 | static const char *decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P" }; | 52 | static const char *const decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P" }; |
| 53 | 53 | ||
| 54 | static const char *unit_second_str = "s" ; | 54 | static const char unit_second_str[] = "s" ; |
| 55 | static const char *unit_hertz_str = "Hz" ; | 55 | static const char unit_hertz_str[] = "Hz" ; |
| 56 | static const char *unit_byte_str = "byte" ; | 56 | static const char unit_byte_str[] = "byte" ; |
| 57 | static const char *unit_bit_per_second_str = "bit/s"; | 57 | static const char unit_bit_per_second_str[] = "bit/s"; |
| 58 | 58 | ||
| 59 | void exit_program(int ret) | 59 | void exit_program(int ret) |
| 60 | { | 60 | { |
| @@ -1865,7 +1865,7 @@ static int http_parse_request(HTTPContext *c) · 1864 unmodified lines | |||
| 1865 | 1865 | ||
| 1866 | static void fmt_bytecount(AVIOContext *pb, int64_t count) | 1866 | static void fmt_bytecount(AVIOContext *pb, int64_t count) |
| 1867 | { | 1867 | { |
| 1868 | static const char *suffix = " kMGTP"; | 1868 | static const char suffix[] = " kMGTP"; |
| 1869 | const char *s; | 1869 | const char *s; |
| 1870 | 1870 | ||
| 1871 | for (s = suffix; count >= 100000 && s[1]; count /= 1000, s++); | 1871 | for (s = suffix; count >= 100000 && s[1]; count /= 1000, s++); |
| @@ -1015,7 +1015,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, · 1014 unmodified lines | |||
| 1015 | int offset[3] = { global_gain, global_gain - 90, 0 }; | 1015 | int offset[3] = { global_gain, global_gain - 90, 0 }; |
| 1016 | int clipped_offset; | 1016 | int clipped_offset; |
| 1017 | int noise_flag = 1; | 1017 | int noise_flag = 1; |
| 1018 | static const char *sf_str[3] = { "Global gain", "Noise gain", "Intensity stereo position" }; | 1018 | static const char *const sf_str[3] = { "Global gain", "Noise gain", "Intensity stereo position" }; |
| 1019 | for (g = 0; g < ics->num_window_groups; g++) { | 1019 | for (g = 0; g < ics->num_window_groups; g++) { |
| 1020 | for (i = 0; i < ics->max_sfb;) { | 1020 | for (i = 0; i < ics->max_sfb;) { |
| 1021 | int run_end = band_type_run_end[idx]; | 1021 | int run_end = band_type_run_end[idx]; |
| @@ -66,7 +66,7 @@ typedef struct VP8EncoderContext { · 65 unmodified lines | |||
| 66 | } VP8Context; | 66 | } VP8Context; |
| 67 | 67 | ||
| 68 | /** String mappings for enum vp8e_enc_control_id */ | 68 | /** String mappings for enum vp8e_enc_control_id */ |
| 69 | static const char *ctlidstr[] = { | 69 | static const char *const ctlidstr[] = { |
| 70 | [VP8E_UPD_ENTROPY] = "VP8E_UPD_ENTROPY", | 70 | [VP8E_UPD_ENTROPY] = "VP8E_UPD_ENTROPY", |
| 71 | [VP8E_UPD_REFERENCE] = "VP8E_UPD_REFERENCE", | 71 | [VP8E_UPD_REFERENCE] = "VP8E_UPD_REFERENCE", |
| 72 | [VP8E_USE_REFERENCE] = "VP8E_USE_REFERENCE", | 72 | [VP8E_USE_REFERENCE] = "VP8E_USE_REFERENCE", |
| @@ -47,7 +47,7 @@ int ff_xvid_rate_control_init(MpegEncContext *s){ · 46 unmodified lines | |||
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | for(i=0; i<s->rc_context.num_entries; i++){ | 49 | for(i=0; i<s->rc_context.num_entries; i++){ |
| 50 | static const char *frame_types = " ipbs"; | 50 | static const char frame_types[] = " ipbs"; |
| 51 | char tmp[256]; | 51 | char tmp[256]; |
| 52 | RateControlEntry *rce; | 52 | RateControlEntry *rce; |
| 53 | 53 | ||
| @@ -30,7 +30,7 @@ · 29 unmodified lines | |||
| 30 | #include "libavutil/pixdesc.h" | 30 | #include "libavutil/pixdesc.h" |
| 31 | #include "avfilter.h" | 31 | #include "avfilter.h" |
| 32 | 32 | ||
| 33 | static const char *var_names[] = { | 33 | static const char *const var_names[] = { |
| 34 | "w", | 34 | "w", |
| 35 | "h", | 35 | "h", |
| 36 | "cw", | 36 | "cw", |
| @@ -32,7 +32,7 @@ · 31 unmodified lines | |||
| 32 | #include "libavutil/imgutils.h" | 32 | #include "libavutil/imgutils.h" |
| 33 | #include "libavutil/mathematics.h" | 33 | #include "libavutil/mathematics.h" |
| 34 | 34 | ||
| 35 | static const char *var_names[] = { | 35 | static const char *const var_names[] = { |
| 36 | "E", | 36 | "E", |
| 37 | "PHI", | 37 | "PHI", |
| 38 | "PI", | 38 | "PI", |
| @@ -49,7 +49,7 @@ · 48 unmodified lines | |||
| 49 | #include FT_FREETYPE_H | 49 | #include FT_FREETYPE_H |
| 50 | #include FT_GLYPH_H | 50 | #include FT_GLYPH_H |
| 51 | 51 | ||
| 52 | static const char *var_names[] = { | 52 | static const char *const var_names[] = { |
| 53 | "E", | 53 | "E", |
| 54 | "PHI", | 54 | "PHI", |
| 55 | "PI", | 55 | "PI", |
| @@ -64,8 +64,8 @@ static const char *var_names[] = { · 8 unmodified lines | |||
| 64 | NULL | 64 | NULL |
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | static const char *fun2_names[] = { | 67 | static const char *const fun2_names[] = { |
| 68 | "rand", | 68 | "rand" |
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | static double drand(void *opaque, double min, double max) | 71 | static double drand(void *opaque, double min, double max) |
| @@ -31,7 +31,7 @@ · 30 unmodified lines | |||
| 31 | #include "avfilter.h" | 31 | #include "avfilter.h" |
| 32 | #include "internal.h" | 32 | #include "internal.h" |
| 33 | 33 | ||
| 34 | static const char *var_names[] = { | 34 | static const char *const var_names[] = { |
| 35 | "E", | 35 | "E", |
| 36 | "PHI", | 36 | "PHI", |
| 37 | "PI", | 37 | "PI", |
| @@ -33,7 +33,7 @@ · 32 unmodified lines | |||
| 33 | #include "libavutil/mathematics.h" | 33 | #include "libavutil/mathematics.h" |
| 34 | #include "internal.h" | 34 | #include "internal.h" |
| 35 | 35 | ||
| 36 | static const char *var_names[] = { | 36 | static const char *const var_names[] = { |
| 37 | "E", | 37 | "E", |
| 38 | "PHI", | 38 | "PHI", |
| 39 | "PI", | 39 | "PI", |
| @@ -35,7 +35,7 @@ · 34 unmodified lines | |||
| 35 | #include "libavutil/mathematics.h" | 35 | #include "libavutil/mathematics.h" |
| 36 | #include "drawutils.h" | 36 | #include "drawutils.h" |
| 37 | 37 | ||
| 38 | static const char *var_names[] = { | 38 | static const char *const var_names[] = { |
| 39 | "PI", | 39 | "PI", |
| 40 | "PHI", | 40 | "PHI", |
| 41 | "E", | 41 | "E", |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | |||
| 30 | #include "libavutil/pixdesc.h" | 30 | #include "libavutil/pixdesc.h" |
| 31 | #include "libswscale/swscale.h" | 31 | #include "libswscale/swscale.h" |
| 32 | 32 | ||
| 33 | static const char *var_names[] = { | 33 | static const char *const var_names[] = { |
| 34 | "PI", | 34 | "PI", |
| 35 | "PHI", | 35 | "PHI", |
| 36 | "E", | 36 | "E", |
| @@ -28,7 +28,7 @@ · 27 unmodified lines | |||
| 28 | #include "libavutil/mathematics.h" | 28 | #include "libavutil/mathematics.h" |
| 29 | #include "avfilter.h" | 29 | #include "avfilter.h" |
| 30 | 30 | ||
| 31 | static const char *var_names[] = { | 31 | static const char *const var_names[] = { |
| 32 | "E", ///< Euler number | 32 | "E", ///< Euler number |
| 33 | "PHI", ///< golden ratio | 33 | "PHI", ///< golden ratio |
| 34 | "PI", ///< greek pi | 34 | "PI", ///< greek pi |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | |||
| 30 | #include "libavutil/mathematics.h" | 30 | #include "libavutil/mathematics.h" |
| 31 | #include "avfilter.h" | 31 | #include "avfilter.h" |
| 32 | 32 | ||
| 33 | static const char *var_names[] = { | 33 | static const char *const var_names[] = { |
| 34 | "E", ///< Euler number | 34 | "E", ///< Euler number |
| 35 | "INTERLACED", ///< tell if the current frame is interlaced | 35 | "INTERLACED", ///< tell if the current frame is interlaced |
| 36 | "N", ///< frame number (starting at zero) | 36 | "N", ///< frame number (starting at zero) |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | |||
| 30 | #include "avfilter.h" | 30 | #include "avfilter.h" |
| 31 | #include "internal.h" | 31 | #include "internal.h" |
| 32 | 32 | ||
| 33 | static const char *var_names[] = { | 33 | static const char *const var_names[] = { |
| 34 | "E", | 34 | "E", |
| 35 | "PHI", | 35 | "PHI", |
| 36 | "PI", | 36 | "PI", |
| @@ -27,7 +27,7 @@ · 26 unmodified lines | |||
| 27 | #include "libavutil/parseutils.h" | 27 | #include "libavutil/parseutils.h" |
| 28 | #include "avfilter.h" | 28 | #include "avfilter.h" |
| 29 | 29 | ||
| 30 | static const char *var_names[] = { | 30 | static const char *const var_names[] = { |
| 31 | "E", | 31 | "E", |
| 32 | "PHI", | 32 | "PHI", |
| 33 | "PI", | 33 | "PI", |
| @@ -514,7 +514,7 @@ static EbmlSyntax matroska_clusters[] = { · 513 unmodified lines | |||
| 514 | { 0 } | 514 | { 0 } |
| 515 | }; | 515 | }; |
| 516 | 516 | ||
| 517 | static const char *matroska_doctypes[] = { "matroska", "webm" }; | 517 | static const char *const matroska_doctypes[] = { "matroska", "webm" }; |
| 518 | 518 | ||
| 519 | /* | 519 | /* |
| 520 | * Return: Whether we reached the end of a level in the hierarchy or not. | 520 | * Return: Whether we reached the end of a level in the hierarchy or not. |
| @@ -543,13 +543,13 @@ int av_expr_parse_and_eval(double *d, const char *s, · 542 unmodified lines | |||
| 543 | #undef printf | 543 | #undef printf |
| 544 | #include <string.h> | 544 | #include <string.h> |
| 545 | 545 | ||
| 546 | static double const_values[] = { | 546 | static const double const_values[] = { |
| 547 | M_PI, | 547 | M_PI, |
| 548 | M_E, | 548 | M_E, |
| 549 | 0 | 549 | 0 |
| 550 | }; | 550 | }; |
| 551 | 551 | ||
| 552 | static const char *const_names[] = { | 552 | static const char *const const_names[] = { |
| 553 | "PI", | 553 | "PI", |
| 554 | "E", | 554 | "E", |
| 555 | 0 | 555 | 0 |