Bug Summary

File:select/properties/volume.c
Warning:line 26, column 4
Value stored to 'val' is never read

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name volume.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/var/lib/jenkins/workspace/scan-build-libcss -resource-dir /usr/lib/llvm-14/lib/clang/14.0.6 -D _BSD_SOURCE -D _DEFAULT_SOURCE -I /var/lib/jenkins/workspace/scan-build-libcss/include/ -I /var/lib/jenkins/workspace/scan-build-libcss/src -D _ALIGNED=__attribute__((aligned)) -D STMTEXPR=1 -D DEBUG -I /var/lib/jenkins/artifacts-x86_64-linux-gnu/include -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.6/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wwrite-strings -Wno-error -std=c99 -fconst-strings -fdebug-compilation-dir=/var/lib/jenkins/workspace/scan-build-libcss -ferror-limit 19 -fgnuc-version=4.2.1 -analyzer-display-progress -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /var/lib/jenkins/workspace/scan-build-libcss/clangScanBuildReports/2024-03-18-092321-257287-1 -x c src/select/properties/volume.c
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
17css_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 }
44 }
45
46 unit = css__to_css_unit(unit);
47
48 if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
49 getFlagValue(opv))) {
50 /** \todo volume */
51 }
52
53 return CSS_OK;
54}
55
56css_error css__set_volume_from_hint(const css_hint *hint,
57 css_computed_style *style)
58{
59 UNUSED(hint)((void)(hint));
60 UNUSED(style)((void)(style));
61
62 return CSS_OK;
63}
64
65css_error css__initial_volume(css_select_state *state)
66{
67 UNUSED(state)((void)(state));
68
69 return CSS_OK;
70}
71
72css_error css__copy_volume(
73 const css_computed_style *from,
74 css_computed_style *to)
75{
76 UNUSED(from)((void)(from));
77 UNUSED(to)((void)(to));
78
79 return CSS_OK;
80}
81
82css_error css__compose_volume(const css_computed_style *parent,
83 const css_computed_style *child,
84 css_computed_style *result)
85{
86 UNUSED(parent)((void)(parent));
87 UNUSED(child)((void)(child));
88 UNUSED(result)((void)(result));
89
90 return CSS_OK;
91}
92