Bug Summary

File:select/properties/speech_rate.c
Warning:line 25, column 4
Value stored to 'rate' 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 speech_rate.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=none -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 -Og -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-05-27-150941-3424187-1 -x c src/select/properties/speech_rate.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_speech_rate(uint32_t opv, css_style *style,
18 css_select_state *state)
19{
20 css_fixed rate = 0;
21
22 if (hasFlagValue(opv) == false0) {
23 switch (getValue(opv)) {
24 case SPEECH_RATE_SET:
25 rate = *((css_fixed *) style->bytecode);
Value stored to 'rate' is never read
26 advance_bytecode(style, sizeof(rate));
27 break;
28 case SPEECH_RATE_X_SLOW:
29 case SPEECH_RATE_SLOW:
30 case SPEECH_RATE_MEDIUM:
31 case SPEECH_RATE_FAST:
32 case SPEECH_RATE_X_FAST:
33 case SPEECH_RATE_FASTER:
34 case SPEECH_RATE_SLOWER:
35 /** \todo convert to public values */
36 break;
37 case SPEECH_RATE_CALC:
38 advance_bytecode(style, sizeof(unit));
39 advance_bytecode(style, sizeof(unit)); // TODO
40 return CSS_OK;
41 default:
42 assert(0 && "Invalid value")((0 && "Invalid value") ? (void) (0) : __assert_fail (
"0 && \"Invalid value\"", "src/select/properties/speech_rate.c"
, 42, __extension__ __PRETTY_FUNCTION__))
;
43 break;
44 }
45 }
46
47 if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
48 getFlagValue(opv))) {
49 /** \todo speech-rate */
50 }
51
52 return CSS_OK;
53}
54
55css_error css__set_speech_rate_from_hint(const css_hint *hint,
56 css_computed_style *style)
57{
58 UNUSED(hint)((void)(hint));
59 UNUSED(style)((void)(style));
60
61 return CSS_OK;
62}
63
64css_error css__initial_speech_rate(css_select_state *state)
65{
66 UNUSED(state)((void)(state));
67
68 return CSS_OK;
69}
70
71css_error css__copy_speech_rate(
72 const css_computed_style *from,
73 css_computed_style *to)
74{
75 UNUSED(from)((void)(from));
76 UNUSED(to)((void)(to));
77
78 return CSS_OK;
79}
80
81css_error css__compose_speech_rate(const css_computed_style *parent,
82 const css_computed_style *child,
83 css_computed_style *result)
84{
85 UNUSED(parent)((void)(parent));
86 UNUSED(child)((void)(child));
87 UNUSED(result)((void)(result));
88
89 return CSS_OK;
90}
91