File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8400,6 +8400,7 @@ YY_RULE_SETUP
84008400 driver.loc .push_back (new yy::location ());
84018401 driver.m_filenames .push_back (f);
84028402 driver.loc .back ()->begin .filename = driver.loc .back ()->end .filename = &(driver.m_filenames .back ());
8403+ // NOSONAR
84038404 if (!modsecurity::utils::fopen_modsec (&yyin, f.c_str (), " r" ) != 0 ) {
84048405 BEGIN (INITIAL );
84058406 driver.loc .pop_back ();
@@ -8431,7 +8432,7 @@ YY_RULE_SETUP
84318432 driver.loc .push_back (new yy::location ());
84328433 driver.m_filenames .push_back (f);
84338434 driver.loc .back ()->begin .filename = driver.loc .back ()->end .filename = &(driver.m_filenames .back ());
8434-
8435+ // NOSONAR
84358436 if (!modsecurity::utils::fopen_modsec (&yyin, f.c_str (), " r" ) != 0 ) {
84368437 BEGIN (INITIAL );
84378438 driver.loc .pop_back ();
Original file line number Diff line number Diff line change @@ -220,15 +220,22 @@ bool isFile(const std::string& f) {
220220 return true ;
221221}
222222
223+ #if defined(_MSC_VER)
224+ #pragma warning(push)
225+ #pragma warning(disable : 4996)
226+ #endif
223227bool fopen_modsec (FILE **v_fp, const char *filename, const char *mode) {
224- if (v_fp == NULL || filename == NULL || mode == NULL ) {
228+ if (v_fp == nullptr || filename == nullptr || mode == nullptr ) {
225229 return false ;
226230 }
227231 *v_fp = fopen (filename, mode);
228- if (*v_fp == NULL ) {
232+ if (*v_fp == nullptr ) {
229233 return false ;
230234 }
231235 return true ;
232236}
237+ #if defined(_MSC_VER)
238+ #pragma warning(pop)
239+ #endif
233240} // namespace utils
234241} // namespace modsecurity
You can’t perform that action at this time.
0 commit comments