Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rtrlib/rtrlib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: rtrlib/rtrlib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: smlng-pr_travis_fix_cppcheck
Choose a head ref
  • 16 commits
  • 22 files changed
  • 2 contributors

Commits on Apr 11, 2016

  1. travis with libssh and tests

    - update travis.yml
    - add live validation test
    - run make test on travis
    - build with and w/o libssh
    smlng committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    c92a898 View commit details
    Browse the repository at this point in the history
  2. lib: remove unnecessary assignment

    Remove an unnecessary variable assignment, after the assignment the
    variable was not acessed anymore.
    
    Fixes cppcheck warning:
    	[rtrlib/lib/ipv6.c:64]: (style) Variable 'bits_left' is
    	assigned a value that is never used.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    0621701 View commit details
    Browse the repository at this point in the history
  3. pfx: reduce variable scope

    Move the declaration of the rm_node variable into the block where it's
    used.
    This fixes cppcheck warning:
    	[rtrlib/pfx/lpfst/lpfst-pfx.c:57]: (style) The scope of the
    	variable 'rm_node' can be reduced.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    47705e0 View commit details
    Browse the repository at this point in the history
  4. pfx: remove duplicate assignment

    The variable tmp was assigned two times in a row the same value.
    Remove one of the assignments.
    
    This fixes cppcheck warning:
    	[rtrlib/pfx/lpfst/lpfst.c:112] ->
    	[rtrlib/pfx/lpfst/lpfst.c:113]: (performance) Variable 'tmp'
    	is reassigned a value before the old one has been used.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    e2cdd6e View commit details
    Browse the repository at this point in the history
  5. scripts: supress cppcheck duplicateExpression warning in packets.c

    cppcheck was warning:
    	[rtrlib/rtr/packets.c:974] -> [rtrlib/rtr/packets.c:974]: (style) Same
    	expression on both sides of '||'.
    	[rtrlib/rtr/packets.c:976] -> [rtrlib/rtr/packets.c:976]: (style) Same
    	expression on both sides of '||'.
    The expression checks if the rtval is the same than enum error values,
    that are represented internally as the same integer values.
    It should explicitly check for the enum values to ensure that the code
    still works if the order of the enum changes.
    
    Therefore suppress the cppcheck warning.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    c2c8eb8 View commit details
    Browse the repository at this point in the history
  6. transport: reduce variable scope

    Move the variables into the blocks were are they used and remove the
    unnecessary initialization.
    
    This fixes cppcheck warnings:
    	[rtrlib/transport/transport.c:46]: (style) The scope of the
    	variable 'rtval' can be reduced.
    	[rtrlib/transport/transport.c:66]: (style) The scope of the
    	variable 'rtval' can be reduced.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    f5b6577 View commit details
    Browse the repository at this point in the history
  7. tools: reduce variable scope

    Move the variables into the blocks were they are used.
    This fixes cppcheck warnings:
    	[tools/cli-validator.c:67]: (style) The scope of the variable
    	'inputLength' can be reduced.
    	[tools/cli-validator.c:92]: (style) The scope of the variable 'spaces'
    	can be reduced.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    b8a69ca View commit details
    Browse the repository at this point in the history
  8. scripts: supress unwated cppcheck warning in ip.c

    Cppcheck warned:
    	[rtrlib/lib/ip.c:66]: (style) The function 'lrtr_ip_str_cmp'
    	is never used.
    
    The function is used by external programs, like test programs that are
    not checked by cppcheck. Keep the function, supress the warning
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    7a27b68 View commit details
    Browse the repository at this point in the history
  9. scripts: supress cppcheck unusedFunction warnings in transport.c

    Supress the following cppcheck warnings:
    	[rtrlib/transport/transport.c:23]: (style) The function
    	'tr_free' is never used.
    	[rtrlib/transport/transport.c:38]: (style) The function
    	'tr_ident' is never used.
    
    Both functions are used by programs using the library.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    09299be View commit details
    Browse the repository at this point in the history
  10. spki: reduce variable scope

    Move variable declarations in the blocks were they are used.
    The commit fixes the following cppcheck warnings:
    	[rtrlib/spki/hashtable/ht-spkitable.c:143]: (style) The scope of the
    	variable 'element' can be reduced.
    	[rtrlib/spki/hashtable/ht-spkitable.c:191]: (style) The scope of the
    	variable 'current_entry' can be reduced.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    4b92f04 View commit details
    Browse the repository at this point in the history
  11. scripts: supress cppcheck unusedFunctions warnings in ht-spkitable

    Supress the following warning:
    	[rtrlib/spki/hashtable/ht-spkitable.c:188]: (style) The
    	function 'spki_table_search_by_ski' is never used.
    
    The function is used by external programs.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    618aee3 View commit details
    Browse the repository at this point in the history
  12. lib: specify field width length in scanf expression

    This fixes the cppcheck warning:
    	[rtrlib/lib/ipv4.c:35]: (portability) scanf without field
    	width limits can crash with huge input data on some versions
    	of libc.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    c803ca6 View commit details
    Browse the repository at this point in the history
  13. scripts: include cppcheck problem id in output

    Include the id of the reported problem in the cppcheck output.
    This makes it easier to find out the ID for supressing messages.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    3bee0fc View commit details
    Browse the repository at this point in the history
  14. rtrlib: fix pointer arithmetics with void * types

    The C standard doesn't allow arithmetics with void * types because
    it's an incomplete type.
    Fix the parts in packets.c by using a typed ptr for the arithmetics.
    This fixes the cppcheck warnings:
    	arithOperationsOnVoidPointer:rtrlib/rtr/packets.c(737):(portability)
    	'ary' is of type 'void * *'. When using void pointers in
    	calculations, the behaviour is undefined.
    	arithOperationsOnVoidPointer:rtrlib/rtr/packets.c(739):(portability)
    	'ary' is of type 'void * *'. When using void pointers in
    	calculations, the behaviour is undefined.
    	arithOperationsOnVoidPointer:rtrlib/rtr/packets.c(764):(portability)
    	'ary' is of type 'void * *'. When using void pointers in
    	calculations, the behaviour is undefined.
    
    This commit also adapts the line number for suppressed cppcheck
    messages in the file which moved with this change.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    0526a63 View commit details
    Browse the repository at this point in the history
  15. scripts: supress cppcheck warnings in tommyds header files

    cppcheck was complaining about issues in tommyds header files, despite
    the directory is already ignored explicit.
    Also add supress lines for the tommyds header files to supress:
    	CastIntegerToAddressAtReturn:rtrlib/spki/hashtable/tommyds-1.8/tommyarrayof.h(114):(portability)
    	Returning an integer in a function with pointer return type is
    	not portable.
    	CastIntegerToAddressAtReturn:rtrlib/spki/hashtable/tommyds-1.8/tommyarrayblkof.h(95):(portability)
    	Returning an integer in a function with pointer return type is
    	not portable.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    5cd6836 View commit details
    Browse the repository at this point in the history
  16. scripts: use code annotations to supress cppcheck warnings

    Instead of listing the line number in the code for that the warning
    should be suppressed at inline annotations.
    This prevents that the line number of the suppression has to be changed
    in scripts/cppcheck.sh whenever the source file was changed.
    fho committed Apr 11, 2016
    Configuration menu
    Copy the full SHA
    ea82da5 View commit details
    Browse the repository at this point in the history
Loading