Fix some implicit truncations in the interaction with OpenSSL APIs
[folly.git] / folly / FormatArg.h
index 127745c47e16998faea7c5d639cf37c342d0cb8b..701654b3397453a8a59e7c924c0a6ff08ff858dc 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_FORMATARG_H_
-#define FOLLY_FORMATARG_H_
+#pragma once
 
 #include <stdexcept>
 #include <folly/Conv.h>
@@ -212,7 +211,7 @@ inline std::string FormatArg::errorStr(Args&&... args) const {
 }
 
 template <typename... Args>
-inline void FormatArg::error(Args&&... args) const {
+[[noreturn]] inline void FormatArg::error(Args&&... args) const {
   throw BadFormatArg(errorStr(std::forward<Args>(args)...));
 }
 
@@ -275,5 +274,3 @@ inline int FormatArg::splitIntKey() {
 }
 
 }  // namespace folly
-
-#endif /* FOLLY_FORMATARG_H_ */