aboutsummaryrefslogtreecommitdiffstats
path: root/pylint.cfg
AgeCommit message (Expand)AuthorFilesLines
2017-02-23Add pypcap python requirementMatej Klotton1-1/+1
2017-01-05Fix pylint messagesPeter Mikus1-2/+2
2016-12-16Pylint fixesTibor Frank1-4/+4
2016-11-24Fix documentation and pylint errorspmikus1-9/+9
2016-02-25Some changes in pylint configurationMatus Fabian1-2/+2
2016-02-08New version of RF tests.Stefan Kobza1-0/+280
HE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef included_error_bootstrap_h #define included_error_bootstrap_h /* Bootstrap include so that #include <vppinfra/mem.h> can include e.g. <vppinfra/mheap.h> which depends on <vppinfra/vec.h>. */ #include <vppinfra/clib.h> /* for uword */ enum { CLIB_ERROR_FATAL = 1 << 0, CLIB_ERROR_ABORT = 1 << 1, CLIB_ERROR_WARNING = 1 << 2, CLIB_ERROR_ERRNO_VALID = 1 << 16, CLIB_ERROR_NO_RATE_LIMIT = 1 << 17, }; /* Current function name. Need (char *) cast to silence gcc4 pointer signedness warning. */ #define clib_error_function ((char *) __FUNCTION__) #ifndef CLIB_ASSERT_ENABLE #define CLIB_ASSERT_ENABLE (CLIB_DEBUG > 0) #endif /* Low level error reporting function. Code specifies whether to call exit, abort or nothing at all (for non-fatal warnings). */ extern void _clib_error (int code, char *function_name, uword line_number, char *format, ...); #define ASSERT(truth) \ do { \ if (CLIB_ASSERT_ENABLE && ! (truth)) \ { \ _clib_error (CLIB_ERROR_ABORT, 0, 0, \ "%s:%d (%s) assertion `%s' fails", \ __FILE__, \ (uword) __LINE__, \ clib_error_function, \ # truth); \ } \ } while (0) /* * This version always generates code, and has a Coverity-specific * version to stop Coverity complaining about * ALWAYS_ASSERT(p != 0); p->member... */ #ifndef __COVERITY__ #define ALWAYS_ASSERT(truth) \ do { \ if (PREDICT_FALSE(!(truth))) \ { \ _clib_error (CLIB_ERROR_ABORT, 0, 0, \ "%s:%d (%s) assertion `%s' fails", \ __FILE__, \ (uword) __LINE__, \ clib_error_function, \ # truth); \ } \ } while (0) #else /* __COVERITY__ */ #define ALWAYS_ASSERT(truth) \ do { \ if (PREDICT_FALSE(!(truth))) \ { \ abort(); \ } \ } while (0) #endif /* __COVERITY */ #if defined(__clang__) #define STATIC_ASSERT(truth,...) #else #define STATIC_ASSERT(truth,...) _Static_assert(truth, __VA_ARGS__) #endif #define STATIC_ASSERT_SIZEOF(d, s) \ STATIC_ASSERT (sizeof (d) == s, "Size of " #d " must be " # s " bytes") #define STATIC_ASSERT_SIZEOF_ELT(d, e, s) \ STATIC_ASSERT (sizeof (((d *)0)->e) == s, "Size of " #d "." #e " must be " # s " bytes") #define STATIC_ASSERT_OFFSET_OF(s, e, o) \ STATIC_ASSERT (STRUCT_OFFSET_OF(s,e) == o, "Offset of " #s "." #e " must be " # o) #define STATIC_ASSERT_FITS_IN(s, e, o) \ STATIC_ASSERT (STRUCT_OFFSET_OF(s,e) <= (o - sizeof(((s *)0)->e)), \ #s "." #e " does not fit into " # o " bytes") /* Assert without allocating memory. */ #define ASSERT_AND_PANIC(truth) \ do { \ if (CLIB_ASSERT_ENABLE && ! (truth)) \ os_panic (); \ } while (0) #endif /* included_error_bootstrap_h */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */