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

Fix one compiling error #988

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gfreewind
Copy link

Add the header file to fix the following error.

g++ -DHAVE_CONFIG_H -I. -I.. -g -I../SAI/inc -I../SAI/experimental
-I../SAI/meta -I../meta -I../lib -I../syncd -ansi -fPIC -std=c++14 -Wall
-Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Werror
-Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security
-Wformat-y2k -Wimport -Winit-self -Wno-inline -Winvalid-pch
-Wmissing-field-initializers -Wmissing-format-attribute
-Wmissing-include-dirs -Wmissing-noreturn -Wno-aggregate-return
-Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked
-Wpointer-arith -Wredundant-decls -Wshadow -Wstack-protector
-Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code
-Wunused -Wvariadic-macros -Wwrite-strings -Wno-switch-default
-Wconversion -Wno-psabi -Wcast-align=strict -g -O2 -MT
libAsicCmp_a-SaiSwitchAsic.o -MD -MP -MF
.deps/libAsicCmp_a-SaiSwitchAsic.Tpo -c -o libAsicCmp_a-SaiSwitchAsic.o
test -f 'SaiSwitchAsic.cpp' || echo './'SaiSwitchAsic.cpp
In file included from SaiSwitchAsic.cpp:1:
SaiSwitchAsic.h:24:46: error: ‘string’ is not a member of ‘std’
24 | In const std::map<std::string,
sai_object_id_t>& hidden,

Add the header file <string> to fix the following error.

g++ -DHAVE_CONFIG_H -I. -I..    -g -I../SAI/inc -I../SAI/experimental
-I../SAI/meta -I../meta -I../lib -I../syncd -ansi -fPIC -std=c++14 -Wall
-Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Werror
-Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security
-Wformat-y2k -Wimport -Winit-self -Wno-inline -Winvalid-pch
-Wmissing-field-initializers -Wmissing-format-attribute
-Wmissing-include-dirs -Wmissing-noreturn -Wno-aggregate-return
-Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked
-Wpointer-arith -Wredundant-decls -Wshadow -Wstack-protector
-Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code
-Wunused -Wvariadic-macros -Wwrite-strings -Wno-switch-default
-Wconversion -Wno-psabi -Wcast-align=strict  -g -O2 -MT
libAsicCmp_a-SaiSwitchAsic.o -MD -MP -MF
.deps/libAsicCmp_a-SaiSwitchAsic.Tpo -c -o libAsicCmp_a-SaiSwitchAsic.o
`test -f 'SaiSwitchAsic.cpp' || echo './'`SaiSwitchAsic.cpp
In file included from SaiSwitchAsic.cpp:1:
SaiSwitchAsic.h:24:46: error: ‘string’ is not a member of ‘std’
   24 |                     _In_ const std::map<std::string,
      sai_object_id_t>& hidden,
The error is following.

TestTrafficForwarder.cpp: In member function 'virtual void
TrafficForwarder_addVlanTag_Test::TestBody()':
TestTrafficForwarder.cpp:47:35: error: cast from 'unsigned char*' to
'tpacket_auxdata*' increases required alignment of target type
[-Werror=cast-align]
   47 |     struct tpacket_auxdata* aux = (struct
      tpacket_auxdata*)CMSG_DATA(cmsg);
            |                                   ^

Now add one void* conversion to avoid it.
@ghost
Copy link

ghost commented Dec 22, 2021

CLA assistant check
All CLA requirements met.

@kcudnik
Copy link
Collaborator

kcudnik commented Jan 13, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

2 participants