Bug Summary

File:select/properties/azimuth.c
Warning:line 24, 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 azimuth.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-10-20-124952-516876-1 -x c src/select/properties/azimuth.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 "utils/utils.h"
11
12#include "select/properties/properties.h"
13#include "select/properties/helpers.h"
14
15css_error css__cascade_azimuth(uint32_t opv, css_style *style,
16 css_select_state *state)
17{
18 css_fixed val = 0;
19 uint32_t unit = UNIT_DEG;
20
21 if (hasFlagValue(opv) == false0) {
22 switch (getValue(opv) & ~AZIMUTH_BEHIND) {
23 case AZIMUTH_ANGLE:
24 val = *((css_fixed *) style->bytecode);
Value stored to 'val' is never read
25 advance_bytecode(style, sizeof(val));
26 unit = *((uint32_t *) style->bytecode);
27 advance_bytecode(style, sizeof(unit));
28 break;
29 case AZIMUTH_LEFTWARDS:
30 case AZIMUTH_RIGHTWARDS:
31 case AZIMUTH_LEFT_SIDE:
32 case AZIMUTH_FAR_LEFT:
33 case AZIMUTH_LEFT:
34 case AZIMUTH_CENTER_LEFT:
35 case AZIMUTH_CENTER:
36 case AZIMUTH_CENTER_RIGHT:
37 case AZIMUTH_RIGHT:
38 case AZIMUTH_FAR_RIGHT:
39 case AZIMUTH_RIGHT_SIDE:
40 /** \todo azimuth values */
41 break;
42 }
43
44 /** \todo azimuth behind */
45 }
46
47 unit = css__to_css_unit(unit);
48
49 if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
50 getFlagValue(opv))) {
51 /** \todo set computed azimuth */
52 }
53
54 return CSS_OK;
55}
56
57css_error css__set_azimuth_from_hint(const css_hint *hint,
58 css_computed_style *style)
59{
60 UNUSED(hint)((void)(hint));
61 UNUSED(style)((void)(style));
62
63 return CSS_OK;
64}
65
66css_error css__initial_azimuth(css_select_state *state)
67{
68 UNUSED(state)((void)(state));
69
70 return CSS_OK;
71}
72
73css_error css__copy_azimuth(
74 const css_computed_style *from,
75 css_computed_style *to)
76{
77 UNUSED(from)((void)(from));
78 UNUSED(to)((void)(to));
79
80 return CSS_OK;
81}
82
83css_error css__compose_azimuth(const css_computed_style *parent,
84 const css_computed_style *child,
85 css_computed_style *result)
86{
87 UNUSED(parent)((void)(parent));
88 UNUSED(child)((void)(child));
89 UNUSED(result)((void)(result));
90
91 return CSS_OK;
92}
93