DPDK CI discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: dev@dpdk.org, ci@dpdk.org
Subject: Re: [PATCH v4 4/4] eal: remove unneeded includes from a public header
Date: Wed, 21 Sep 2022 13:37:05 +0200	[thread overview]
Message-ID: <CAJFAV8zYGoUJhD6eRKGKks=hkHPN4DkDLSwpqCEQ8DBSxZqWhw@mail.gmail.com> (raw)
In-Reply-To: <20220827113222.3951505-5-dmitry.kozliuk@gmail.com>

On Sat, Aug 27, 2022 at 1:33 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>
> Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>,
> because they are not used by this file.
> Include the needed headers directly from the files that need them.
>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---

[snip]

>  examples/vdpa/main.c                                     | 1 +
>  examples/vhost/main.c                                    | 2 ++
>  examples/vhost/virtio_net.c                              | 1 +
>  examples/vhost_blk/vhost_blk.c                           | 1 +

We are missing an update of vm_power_manager example:

../../../dpdk/examples/vm_power_manager/parse.c: In function ‘parse_set’:
../../../dpdk/examples/vm_power_manager/parse.c:28:16: error: implicit
declaration of function ‘isblank’
[-Werror=implicit-function-declaration]
   28 |         while (isblank(*str))
      |                ^~~~~~~
../../../dpdk/examples/vm_power_manager/parse.c:9:1: note: include
‘<ctype.h>’ or provide a declaration of ‘isblank’
    8 | #include "parse.h"
  +++ |+#include <ctype.h>
    9 |


I am surprised the CI did not catch this issue.
I suspect some dependencies (probably libvirt-devel) are not installed
in CI environments.


The following diff seems enough to fix the issue, can you double check?


diff --git a/examples/vm_power_manager/channel_monitor.c
b/examples/vm_power_manager/channel_monitor.c
index 97b8def7ca..5fef268662 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -2,6 +2,7 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */

+#include <ctype.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/examples/vm_power_manager/guest_cli/parse.c
b/examples/vm_power_manager/guest_cli/parse.c
index 528df6d6f1..6ed2d5cb49 100644
--- a/examples/vm_power_manager/guest_cli/parse.c
+++ b/examples/vm_power_manager/guest_cli/parse.c
@@ -3,9 +3,13 @@
  * Copyright(c) 2014 6WIND S.A.
  */

+#include <ctype.h>
+#include <errno.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include <rte_log.h>
+
 #include "parse.h"

 /*
diff --git a/examples/vm_power_manager/parse.c
b/examples/vm_power_manager/parse.c
index 8a8dcf05fe..5467035994 100644
--- a/examples/vm_power_manager/parse.c
+++ b/examples/vm_power_manager/parse.c
@@ -3,8 +3,13 @@
  * Copyright(c) 2014 6WIND S.A.
  */

+#include <ctype.h>
+#include <errno.h>
+#include <stdlib.h>
 #include <string.h>
+
 #include <rte_log.h>
+
 #include "parse.h"

 /*


-- 
David Marchand


           reply	other threads:[~2022-09-21 11:37 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20220827113222.3951505-5-dmitry.kozliuk@gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8zYGoUJhD6eRKGKks=hkHPN4DkDLSwpqCEQ8DBSxZqWhw@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=ci@dpdk.org \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).