Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-format for coherent indentation and coding style #3459

Merged
merged 246 commits into from
May 18, 2023

Conversation

linuxmaniac
Copy link
Member

changes in modules after clang-format execution.

This is a test to check the pull-request check of clang-format

rd_buf_t *rb; /*!< buffer used to read from TCP connection*/
char* diameter_client_host="localhost";
int diameter_client_port=3000;
rd_buf_t *rb; /*!< buffer used to read from TCP connection*/

Check notice

Code scanning / CodeQL

Short global name Note

Poor global variable name 'rb'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo).
if (duk_is_string(ctx, -1)) {
duk_int_t ret;
if(duk_is_string(ctx, -1)) {
duk_int_t ret;

Check notice

Code scanning / CodeQL

Declaration hides variable Note

Variable ret hides another variable of the same name (on
line 78
).
if (pos>=0 && pos<len)
{
} else {
if(pos >= 0 && pos < len) {

Check warning

Code scanning / CodeQL

Comparison result is always the same Warning

Comparison is always true because pos >= 0.
PKG_MEM_ERROR;
/* cleanup already allocated memory and
* return that we didn't do anything */
for (i = i-1; i >= 0; i--) {
if (NULL != values[i].s){
for(i = i - 1; i >= 0; i--) {

Check notice

Code scanning / CodeQL

For loop variable changed in body Note

Loop counters should not be modified in the body of the
loop
.
PKG_MEM_ERROR;
/* cleanup already allocated memory and
* return that we didn't do anything */
for (i = i-1; i >= 0; i--) {
if (NULL != values[i].s){
for(i = i - 1; i >= 0; i--) {

Check notice

Code scanning / CodeQL

For loop variable changed in body Note

Loop counters should not be modified in the body of the
loop
.
AAA_ERR_NOMEM, /* op. caused memory to be exhausted */
AAA_ERR_PROTO, /* AAA protocol error */
typedef enum
{

Check notice

Code scanning / CodeQL

Irregular enum initialization Note

In an enumerator list, the = construct should not be used to explicitly initialize members other than the first, unless all items are explicitly initialized.
cdr_time_format_buf[i][0] = '\0';
}

VAL_STRING(db_cdr_vals+i) = cdr_time_format_buf[i];
VAL_STRING(db_cdr_vals + i) = cdr_time_format_buf[i];

Check warning

Code scanning / CodeQL

Local variable address stored in non-local memory Warning

A stack address (
source
) may be assigned to a non-local variable.
@linuxmaniac linuxmaniac merged commit 83b092f into master May 18, 2023
7 of 8 checks passed
@linuxmaniac linuxmaniac deleted the vseva/clang-format branch May 18, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant