Skip to content

Commit

Permalink
Bug 1232219 (part 3) - Fix remaining -Wunused warnings. r=glandium.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Dec 17, 2015
1 parent 0a745e0 commit 19ddd3f
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 5 deletions.
3 changes: 3 additions & 0 deletions media/libcubeb/src/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':

CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']

# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
3 changes: 3 additions & 0 deletions media/libmkv/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ SOURCES += [
]

FINAL_LIBRARY = 'gkmedias'

# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
3 changes: 3 additions & 0 deletions media/libnestegg/src/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ UNIFIED_SOURCES += [
]

FINAL_LIBRARY = 'gkmedias'

# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
3 changes: 3 additions & 0 deletions media/libpng/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ if CONFIG['MOZ_PNG_ARM_NEON']:
Library('mozpng')

FINAL_LIBRARY = 'gkmedias'

# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
2 changes: 2 additions & 0 deletions media/libtremor/lib/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ LOCAL_INCLUDES += [
'/media/libtremor/include/tremor',
]

# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
2 changes: 1 addition & 1 deletion memory/build/mozjemalloc_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jemalloc_stats_impl(jemalloc_stats_t *stats)
// src/ctl.c
uint64_t epoch = 0;
size_t esz = sizeof(epoch);
int ret = je_(mallctl)("epoch", &epoch, &esz, &epoch, esz);
je_(mallctl)("epoch", &epoch, &esz, &epoch, esz);

CTL_GET("arenas.narenas", narenas);
CTL_GET("arenas.page", page);
Expand Down
5 changes: 3 additions & 2 deletions memory/mozjemalloc/jemalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 +1703,9 @@ malloc_mutex_unlock(malloc_mutex_t *mutex)
#endif
}

#if (defined(__GNUC__))
__attribute__((unused))
# endif
static bool
malloc_spin_init(malloc_spinlock_t *lock)
{
Expand Down Expand Up @@ -6655,8 +6658,6 @@ jemalloc_stats_impl(jemalloc_stats_t *stats)
for (j = 0; j < ntbins + nqbins + nsbins; j++) {
arena_bin_t* bin = &arena->bins[j];
size_t bin_unused = 0;
const size_t run_header_size = sizeof(arena_run_t) +
(sizeof(unsigned) * (bin->regs_mask_nelms - 1));

rb_foreach_begin(arena_chunk_map_t, link, &bin->runs, mapelm) {
run = (arena_run_t *)(mapelm->bits & ~pagesize_mask);
Expand Down
3 changes: 1 addition & 2 deletions toolkit/components/mediasniffer/mp3sniff.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,11 @@ static int id3_framesize(const uint8_t *p, long length)
int mp3_sniff(const uint8_t *buf, long length)
{
mp3_header header;
const uint8_t *p, *q;
const uint8_t *p;
long skip;
long avail;

p = buf;
q = p;
avail = length;
while (avail >= 4) {
if (is_id3(p, avail)) {
Expand Down

0 comments on commit 19ddd3f

Please sign in to comment.