Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-488

Build Warnings/Errors on master

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 17.01
    • 17.01
    • None
    • None

      On master, my system encountered several build errors. They are a result of this merge several weeks ago:
      Commit: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commitdiff;h=0bfe5d8c792abcdbcf27bfcc7b7b353fba04aee2
      A Protocol Independent Hierarchical FIB (VPP-352)

      No one else is see the errors, so they must be warnings on their systems.

      Summary of errors:
      1) Couple of "defined but not used" errors:

      /vnet/vnet/mpls/interface.c
      starting on line 535

       static const int dpo_next_2_mpls_post_rewrite[DPO_LAST] = {
             [DPO_LOAD_BALANCE] = IP_LOOKUP_NEXT_LOAD_BALANCE,
      

      My Error Output:

      /home/bmcfall/dev/2016_10_11_VPP_286_ip_doxygen/vpp/build-data/../vnet/vnet/mpls/interface.c:536:18: error: ‘dpo_next_2_mpls_post_rewrite’ defined but not used [-Werror=unused-const-variable=]
       static const int dpo_next_2_mpls_post_rewrite[DPO_LAST] = {
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      

      /vnet/vnet/dpo/lookup_dpo.c
      starting on line 797

      const static char* const lookup_dst_from_interface_ip4_nodes[] =
      {
          "lookup-ip4-dst-itf",
          NULL,
      };
      const static char* const lookup_dst_from_interface_ip6_nodes[] =
      {
          "lookup-ip6-dst-itf",
          NULL,
      };
      const static char* const lookup_dst_from_interface_mpls_nodes[] =
      {
          "lookup-mpls-dst-itf",
          NULL,
      };
      const static char* const * const lookup_dst_from_interface_nodes[DPO_PROTO_NUM] =
      {
          [DPO_PROTO_IP4]  = lookup_dst_from_interface_ip4_nodes,
          [DPO_PROTO_IP6]  = lookup_dst_from_interface_ip6_nodes,
          [DPO_PROTO_MPLS] = lookup_dst_from_interface_mpls_nodes,
      };
      

      My Error Output:

      /home/bmcfall/dev/2016_10_11_VPP_286_ip_doxygen/vpp/build-data/../vnet/vnet/dpo/lookup_dpo.c:813:34: error: ‘lookup_dst_from_interface_nodes’ defined but not used [-Werror=unused-const-variable=]
       const static char* const * const lookup_dst_from_interface_nodes[DPO_PROTO_NUM] =
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      

      2) va_arg() parameter issue:

      There are multiple instances of this. The first example is in /vnet/vnet/lisp-gpe/lisp_gpe_adjacency.c, but around 9 other files hit the same issue.

      starting at line 358

        lisp_gpe_adjacency_format_flags_t flags =
          va_arg (args, lisp_gpe_adjacency_format_flags_t);
      

      I looked around the code, and other calls to va_arg() de-reference the pointer to the variable 'args'. 'man va_arg()' indicates that the first parameter is of type va_list. When I did this it compiled clean.

        lisp_gpe_adjacency_format_flags_t flags =
          va_arg (*args, lisp_gpe_adjacency_format_flags_t);
      

      My Error Output:

        CC       vnet/dpo/lookup_dpo.lo
      /home/bmcfall/dev/2016_10_11_VPP_286_ip_doxygen/vpp/build-data/../vnet/vnet/lisp-gpe/lisp_gpe_adjacency.c: In function ‘format_lisp_gpe_adjacency’:
      /home/bmcfall/dev/2016_10_11_VPP_286_ip_doxygen/vpp/build-data/../vnet/vnet/lisp-gpe/lisp_gpe_adjacency.c:359:5: internal compiler error: in build_va_arg, at c-family/c-common.c:5812
           va_arg (args, lisp_gpe_adjacency_format_flags_t);
           ^~~~~~
      Please submit a full bug report,
      with preprocessed source if appropriate.
      See <http://bugzilla.redhat.com/bugzilla> for instructions.
      Preprocessed source stored into /tmp/ccVa8tTa.out file, please attach this to your bugreport.
      

            BillyM Billy McFall
            BillyM Billy McFall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: