File: | select/properties/volume.c |
Warning: | line 26, column 4 Value stored to 'val' is never read |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | /* |
2 | * This file is part of LibCSS |
3 | * Licensed under the MIT License, |
4 | * http://www.opensource.org/licenses/mit-license.php |
5 | * Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org> |
6 | */ |
7 | |
8 | #include "bytecode/bytecode.h" |
9 | #include "bytecode/opcodes.h" |
10 | #include "select/propset.h" |
11 | #include "select/propget.h" |
12 | #include "utils/utils.h" |
13 | |
14 | #include "select/properties/properties.h" |
15 | #include "select/properties/helpers.h" |
16 | |
17 | css_error css__cascade_volume(uint32_t opv, css_style *style, |
18 | css_select_state *state) |
19 | { |
20 | css_fixed val = 0; |
21 | uint32_t unit = UNIT_PCT; |
22 | |
23 | if (hasFlagValue(opv) == false0) { |
24 | switch (getValue(opv)) { |
25 | case VOLUME_NUMBER: |
26 | val = *((css_fixed *) style->bytecode); |
Value stored to 'val' is never read | |
27 | advance_bytecode(style, sizeof(val)); |
28 | break; |
29 | case VOLUME_DIMENSION: |
30 | val = *((css_fixed *) style->bytecode); |
31 | advance_bytecode(style, sizeof(val)); |
32 | unit = *((uint32_t *) style->bytecode); |
33 | advance_bytecode(style, sizeof(unit)); |
34 | break; |
35 | case VOLUME_SILENT: |
36 | case VOLUME_X_SOFT: |
37 | case VOLUME_SOFT: |
38 | case VOLUME_MEDIUM: |
39 | case VOLUME_LOUD: |
40 | case VOLUME_X_LOUD: |
41 | /** \todo convert to public values */ |
42 | break; |
43 | case VOLUME_CALC: |
44 | advance_bytecode(style, sizeof(unit)); |
45 | advance_bytecode(style, sizeof(unit)); // TODO |
46 | return CSS_OK; |
47 | default: |
48 | assert(0 && "Invalid value")((0 && "Invalid value") ? (void) (0) : __assert_fail ( "0 && \"Invalid value\"", "src/select/properties/volume.c" , 48, __extension__ __PRETTY_FUNCTION__)); |
49 | break; |
50 | } |
51 | } |
52 | |
53 | unit = css__to_css_unit(unit); |
54 | |
55 | if (css__outranks_existing(getOpcode(opv), isImportant(opv), state, |
56 | getFlagValue(opv))) { |
57 | /** \todo volume */ |
58 | } |
59 | |
60 | return CSS_OK; |
61 | } |
62 | |
63 | css_error css__set_volume_from_hint(const css_hint *hint, |
64 | css_computed_style *style) |
65 | { |
66 | UNUSED(hint)((void)(hint)); |
67 | UNUSED(style)((void)(style)); |
68 | |
69 | return CSS_OK; |
70 | } |
71 | |
72 | css_error css__initial_volume(css_select_state *state) |
73 | { |
74 | UNUSED(state)((void)(state)); |
75 | |
76 | return CSS_OK; |
77 | } |
78 | |
79 | css_error css__copy_volume( |
80 | const css_computed_style *from, |
81 | css_computed_style *to) |
82 | { |
83 | UNUSED(from)((void)(from)); |
84 | UNUSED(to)((void)(to)); |
85 | |
86 | return CSS_OK; |
87 | } |
88 | |
89 | css_error css__compose_volume(const css_computed_style *parent, |
90 | const css_computed_style *child, |
91 | css_computed_style *result) |
92 | { |
93 | UNUSED(parent)((void)(parent)); |
94 | UNUSED(child)((void)(child)); |
95 | UNUSED(result)((void)(result)); |
96 | |
97 | return CSS_OK; |
98 | } |
99 |