various files - fix some alerts raised by lgtm code analysis

This patch fixes several issues reported by the lgtm code analysis tool:

https://lgtm.com/projects/g/asterisk/asterisk

Not all reported issues were addressed in this patch. This patch mostly fixes
confirmed reported errors, potential problematic code points, and a few other
"low hanging" warnings or recommendations found in core supported modules.
These include, but are not limited to the following:

* innapropriate stack allocation in loops
* buffer overflows
* variable declaration "hiding" another variable declaration
* comparisons results that are always the same
* ambiguously signed bit-field members
* missing header guards

Change-Id: Id4a881686605d26c94ab5409bc70fcc21efacc25
This commit is contained in:
Kevin Harwell
2019-10-23 12:36:17 -05:00
committed by George Joseph
parent e7320bbbf0
commit 30c0af7257
49 changed files with 324 additions and 203 deletions

View File

@@ -22,6 +22,9 @@
* Samples were truncated at 160 and 320 bytes.
*/
#ifndef ASTERISK_SLIN_H
#define ASTERISK_SLIN_H
static uint16_t ex_slin8[] = {
0x0002, 0xfffc, 0x0000, 0xfffe, 0x0000, 0xfffa, 0x002a, 0x007a,
0x003a, 0xffbe, 0xff76, 0xff84, 0x0016, 0x007e, 0x0096, 0x00d2,
@@ -91,3 +94,5 @@ static inline struct ast_frame *slin16_sample(void)
return &f;
}
#endif /* ASTERISK_SLIN_H */