client/player: Fix checkpatch warning
Luiz Augusto von Dentz
maintainerPATCH 1/2 client/player: Fix checkpatch warning
From: Luiz Augusto von Dentz <[email protected]>
This fixes the following checkpatch warning:
WARNING:LINE_SPACING: Missing a blank line after declarations 216: FILE: client/player.c:625:
+ GDBusProxy *proxy = l->data;
+ print_player(proxy, NULL);
--- client/player.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
client/player.c +4 -7
@@ -604,8 +604,10 @@ static void print_media(GDBusProxy *proxy, const char *description)g_free (str); } -static void print_player (GDBusProxy *proxy,const char *description) +static void print_player (void *data,void *user_data) { +GDBusProxy *proxy = data; +const char *description = user_data;char *str; str =proxy_description (proxy,"Player" , description);
@@ -618,12 +620,7 @@ static void print_player(GDBusProxy *proxy, const char *description)static void cmd_list (int argc,char *arg[]) { -GList *l; - -for (l = players; l; l =g_list_next (l)) { -GDBusProxy *proxy = l->data; -print_player (proxy,NULL ); - } +g_list_foreach (players, print_player,NULL );return bt_shell_noninteractive_quit (EXIT_SUCCESS ); }
Signature · 1 line
2.37.2
Luiz Augusto von Dentz
maintainerPATCH 2/2 shared/shell: Fix scan-build error
From: Luiz Augusto von Dentz <[email protected]>
This fixes the following error:
src/shared/shell.c:1135:19: warning: Null pointer passed to 1st parameter expecting 'nonnull'
data.timeout = atoi(optarg);
^~~~~~~~~~~~
---
src/shared/shell.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)src/shared/shell.c +4 -1
@@ -1101,6 +1101,7 @@ void bt_shell_init(int argc, char **argv, const struct bt_shell_opt *opt)struct option options[256 ];char optstr[256 ];size_t offset; +char *endptr =NULL ; offset =sizeof (main_options) /sizeof (struct option );
@@ -1132,7 +1133,9 @@ void bt_shell_init(int argc, char **argv, const struct bt_shell_opt *opt) data.mode =1 ; goto done;case 't' : - data.timeout =atoi (optarg); + data.timeout =strtol (optarg, &endptr,0 ); +if (!endptr || *endptr !='\0' ) +printf ("Unable to parse timeout\n" );break ;case 'z' : data.zsh =1 ;
Signature · 1 line
2.37.2
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=672614
---Test result---
Test Summary:
CheckPatch FAIL 1.39 seconds GitLint PASS 0.96 seconds Prep - Setup ELL PASS 32.15 seconds Build - Prep PASS 0.65 seconds Build - Configure PASS 10.33 seconds Build - Make PASS 980.25 seconds Make Check PASS 12.90 seconds Make Check w/Valgrind PASS 347.96 seconds Make Distcheck PASS 300.51 seconds Build w/ext ELL - Configure PASS 10.48 seconds Build w/ext ELL - Make PASS 101.00 seconds Incremental Build w/ patches PASS 242.98 seconds Scan Build WARNING 684.12 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
[BlueZ,1/2] client/player: Fix checkpatch warning
WARNING:EMAIL_SUBJECT: A patch subject line should describe the change not the tool that found it #69:
Subject: [PATCH BlueZ 1/2] client/player: Fix checkpatch warning
/github/workspace/src/12959894.patch total: 0 errors, 1 warnings, 24 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/github/workspace/src/12959894.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches. Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************client/player.c:1755:25: warning: Dereference of null pointer
iov_append(&cfg->caps, preset->data.iov_base, preset->data.iov_len);
^~~~~~~~~~~~~~~~~~~~~
1 warning generated.
src/shared/shell.c:1136:19: warning: Null pointer passed to 1st parameter expecting 'nonnull'
data.timeout = strtol(optarg, &endptr, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/shell.c:1158:13: warning: Access to field 'options' results in a dereference of a null pointer (loaded from variable 'opt')
if (c != opt->options[index - offset].val) {
^~~~~~~~~~~~2 warnings generated.
---
Regards,
Linux Bluetooth
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Review
Quoted 10 lines · On Tue, 30 Aug 2022 14:42:14 -0700 you wrote:
From: Luiz Augusto von Dentz <[email protected]>
This fixes the following checkpatch warning:
WARNING:LINE_SPACING: Missing a blank line after declarations 216: FILE:
client/player.c:625:(quoted diff) +2
-0+ GDBusProxy *proxy = l->data; + print_player(proxy, NULL);
Here is the summary with links:
- [BlueZ,1/2] client/player: Fix checkpatch warning
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d8febc76a43f
- [BlueZ,2/2] shared/shell: Fix scan-build error (no matching commit)
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html