Browse Source
Merge pull request #15661 from peter-stadler/nginx-util
nginx-util: do not use fallthrough attribute
lilik-openwrt-22.03
Rosen Penev
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
9 additions and
4 deletions
-
net/nginx-util/Makefile
-
net/nginx-util/src/nginx-ssl-util.hpp
|
|
@ -1,7 +1,7 @@ |
|
|
|
include $(TOPDIR)/rules.mk |
|
|
|
|
|
|
|
PKG_NAME:=nginx-util |
|
|
|
PKG_VERSION:=1.5 |
|
|
|
PKG_VERSION:=1.6 |
|
|
|
PKG_RELEASE:=1 |
|
|
|
PKG_MAINTAINER:=Peter Stadler <peter.stadler@student.uibk.ac.at> |
|
|
|
|
|
|
|
|
|
@ -166,9 +166,14 @@ static constexpr auto _escape = _Line{ |
|
|
|
std::string ret{}; |
|
|
|
for (char c : strptr) { |
|
|
|
switch (c) { |
|
|
|
case '^': ret += '\\'; [[fallthrough]]; |
|
|
|
case '_': [[fallthrough]]; |
|
|
|
case '-': ret += c; break; |
|
|
|
case '^': |
|
|
|
ret += '\\'; |
|
|
|
ret += c; |
|
|
|
break; |
|
|
|
case '_': |
|
|
|
case '-': |
|
|
|
ret += c; |
|
|
|
break; |
|
|
|
default: |
|
|
|
if ((isalpha(c) != 0) || (isdigit(c) != 0)) { |
|
|
|
ret += c; |
|
|
|