Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
misje committed Mar 24, 2019
2 parents 6930316 + 46a2710 commit 09a468b
Show file tree
Hide file tree
Showing 9 changed files with 303 additions and 263 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## 0.4.3 - 2019-03-19
### Added
- DHCP option names are printed along with their option codes.

### Changed
- Debug output is more detailed and aligned.

### Fixed
- Alignment and explicit data type conversions are used to compile without
errors on 32-bit architectures.
- Do not fail on strict-overflow warnings, as some may be ignored.
- Do not use non-ASCII characters in debug output. They were not strictly
needed.

## 0.4.2 - 2019-01-17
### Changed
- Change usage string to reflect formatting used by man page.
Expand Down
31 changes: 30 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,36 @@ set(HEADERS
)
add_executable(dhcpoptinj ${SOURCES} ${HEADERS})
set_property(TARGET dhcpoptinj PROPERTY C_STANDARD 99)
target_compile_options(dhcpoptinj PRIVATE -Wall -Wextra -pedantic -Wcast-align -Wcast-qual -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow=5 -Wswitch-default -Wundef -Werror -Wno-unused -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -fstack-protector -Wwrite-strings -D_POSIX_SOURCE -D_DEFAULT_SOURCE -D_FORTIFY_SOURCE=2)
target_compile_options(dhcpoptinj PRIVATE
-Wall
-Wextra
-pedantic
-Wcast-align
-Wcast-qual
-Wdisabled-optimization
-Wformat=2
-Winit-self
-Wlogical-op
-Wmissing-declarations
-Wmissing-include-dirs
-Wredundant-decls
-Wshadow
-Wsign-conversion
-Wstrict-overflow=5
-Wno-error=strict-overflow
-Wswitch-default
-Wundef
-Werror
-Wno-unused
-Wmissing-prototypes
-Wstrict-prototypes
-Wold-style-definition
-fstack-protector
-Wwrite-strings
-D_POSIX_SOURCE
-D_DEFAULT_SOURCE
-D_FORTIFY_SOURCE=2
)

find_library(NFQ_LIB netfilter_queue REQUIRED)
target_link_libraries(dhcpoptinj ${NFQ_LIB})
Expand Down
222 changes: 0 additions & 222 deletions docs/dhcpoptinj.8

This file was deleted.

4 changes: 2 additions & 2 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ static struct Config *createDefaultConfig(void)

static void printUsage(const char *programName)
{
int progNameLen = strlen(programName);
int progNameLen = (int)strlen(programName);
printf(
"%s – DHCP option injector\n"
"Usage: %s [-df] [--forward-on-fail] [-i|-r] [-p [pid_file]] \n"
" %*s -q queue_num -o dhcp_option [(-o dhcp_option) ]\n"
" %*s -q queue_num -o dhcp_option [(-o dhcp_option) ...]\n"
" %s -h|-v\n"
,
programName,
Expand Down
Loading

0 comments on commit 09a468b

Please sign in to comment.