mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
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:
committed by
George Joseph
parent
990a91b44a
commit
bdd785d31c
@@ -7,6 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASTERISK_EX_ALAW_H
|
||||
#define ASTERISK_EX_ALAW_H
|
||||
|
||||
static uint8_t ex_alaw[] = {
|
||||
0x00, 0x03, 0x06, 0x09, 0x0c, 0x0f, 0x12, 0x15,
|
||||
0x10, 0x18, 0x1b, 0x1e, 0x21, 0x24, 0x27, 0x2a,
|
||||
@@ -34,3 +37,5 @@ static struct ast_frame *alaw_sample(void)
|
||||
f.subclass.format = ast_format_alaw;
|
||||
return &f;
|
||||
}
|
||||
|
||||
#endif /* ASTERISK_EX_ALAW_H */
|
||||
|
@@ -7,6 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASTERISK_EX_G722_H
|
||||
#define ASTERISK_EX_G722_H
|
||||
|
||||
static uint8_t ex_g722[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@@ -46,3 +49,5 @@ static struct ast_frame *g722_sample(void)
|
||||
|
||||
return &f;
|
||||
}
|
||||
|
||||
#endif /* ASTERISK_EX_G722_H */
|
||||
|
@@ -7,6 +7,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASTERISK_EX_ULAW_H
|
||||
#define ASTERISK_EX_ULAW_H
|
||||
|
||||
static uint8_t ex_ulaw[] = {
|
||||
0x00, 0x03, 0x06, 0x09, 0x0c, 0x0f, 0x12, 0x15,
|
||||
0x10, 0x18, 0x1b, 0x1e, 0x21, 0x24, 0x27, 0x2a,
|
||||
@@ -36,3 +39,5 @@ static struct ast_frame *ulaw_sample(void)
|
||||
|
||||
return &f;
|
||||
}
|
||||
|
||||
#endif /* ASTERISK_EX_ULAW_H */
|
||||
|
Reference in New Issue
Block a user