Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unused functions warnings in instrumentation.c. #103515

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

benjaminp
Copy link
Contributor

clang -c -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden  -I../cpython/Include/internal -IObjects -IInclude -IPython -I. -I../cpython/Include    -DPy_BUILD_CORE -o Python/instrumentation.o ../cpython/Python/instrumentation.c
../cpython/Python/instrumentation.c:129:1: warning: unused function 'monitors_equals' [-Wunused-function]
monitors_equals(_Py_Monitors a, _Py_Monitors b)
^
../cpython/Python/instrumentation.c:150:1: warning: unused function 'monitors_and' [-Wunused-function]
monitors_and(_Py_Monitors a, _Py_Monitors b)
^
2 warnings generated.

```
clang -c -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden  -I../cpython/Include/internal -IObjects -IInclude -IPython -I. -I../cpython/Include    -DPy_BUILD_CORE -o Python/instrumentation.o ../cpython/Python/instrumentation.c
../cpython/Python/instrumentation.c:129:1: warning: unused function 'monitors_equals' [-Wunused-function]
monitors_equals(_Py_Monitors a, _Py_Monitors b)
^
../cpython/Python/instrumentation.c:150:1: warning: unused function 'monitors_and' [-Wunused-function]
monitors_and(_Py_Monitors a, _Py_Monitors b)
^
2 warnings generated.
```
@benjaminp benjaminp requested a review from markshannon April 13, 2023 16:00
@markshannon markshannon merged commit 7b95d23 into python:main Apr 13, 2023
@benjaminp benjaminp deleted the monitors-unused-functions branch April 13, 2023 18:01
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot wasm32-emscripten node (pthreads) 3.x has failed when building commit 7b95d23.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1050/builds/1729) and take a look at the build logs.
  4. Check if the failure is related to this commit (7b95d23) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1050/builds/1729

Failed tests:

  • test_fileio

Failed subtests:

  • testErrnoOnClosedTruncate - test.test_fileio.CAutoFileTests.testErrnoOnClosedTruncate

Summary of the results of the build (if available):

== Tests result: FAILURE ==

339 tests OK.

10 slowest tests:

  • test_math: 1 min 24 sec
  • test_lib2to3: 54.7 sec
  • test_tokenize: 44.3 sec
  • test_hashlib: 39.2 sec
  • test_io: 39.1 sec
  • test_capi: 37.1 sec
  • test_unparse: 36.2 sec
  • test_unicodedata: 23.0 sec
  • test_pathlib: 18.2 sec
  • test_statistics: 17.2 sec

1 test failed:
test_fileio

94 tests skipped:
test__xxinterpchannels test__xxsubinterpreters test_asyncgen
test_asyncio test_clinic test_cmd_line test_concurrent_futures
test_contextlib_async test_ctypes test_curses test_dbm_gnu
test_dbm_ndbm test_devpoll test_doctest test_docxmlrpc test_dtrace
test_embed test_epoll test_faulthandler test_fcntl test_file_eintr
test_fork1 test_ftplib test_gdb test_grp test_httplib
test_httpservers test_idle test_imaplib test_interpreters
test_ioctl test_kqueue test_launcher test_lzma test_mmap
test_msilib test_multiprocessing_fork
test_multiprocessing_forkserver test_multiprocessing_main_handling
test_multiprocessing_spawn test_nis test_openpty test_ossaudiodev
test_pdb test_peg_generator test_perf_profiler test_poll
test_poplib test_pty test_pwd test_readline test_regrtest
test_repl test_resource test_select test_selectors test_smtplib
test_smtpnet test_socket test_socketserver test_spwd test_ssl
test_stable_abi_ctypes test_startfile test_subprocess
test_sys_settrace test_syslog test_tcl test_telnetlib test_tix
test_tkinter test_tools test_ttk test_ttk_textonly test_turtle
test_urllib2 test_urllib2_localnet test_urllib2net test_urllibnet
test_venv test_wait3 test_wait4 test_webbrowser test_winconsoleio
test_winreg test_winsound test_wmi test_wsgiref test_xmlrpc
test_xmlrpc_net test_xxlimited test_zipfile64
test_zipimport_support test_zoneinfo
0:24:54 load avg: 7.21
0:24:54 load avg: 7.21 Re-running failed tests is not supported with --python host runner option.

Total duration: 24 min 54 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-pthreads/build/Lib/test/test_fileio.py", line 274, in wrapper
    self.assertEqual(e.errno, errno.EBADF)
AssertionError: 28 != 8


Traceback (most recent call last):
  File "/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-pthreads/build/Lib/test/test_fileio.py", line 272, in wrapper
    func(self, f)
  File "/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-pthreads/build/Lib/test/test_fileio.py", line 302, in testErrnoOnClosedTruncate
    f.truncate(0)
OSError: [Errno 28] Invalid argument

carljm added a commit to carljm/cpython that referenced this pull request Apr 14, 2023
* main:
  pythongh-103532: Remove TKINTER_PROTECT_LOADTK code (pythonGH-103535)
  pythongh-103180: Add CI timeouts to all GitHub Actions jobs (python#103437)
  Remove double space in import error message (python#103458)
  ipaddress: Remove non-existent ip_str param from docstring (python#103461)
  Fix syntax typo in isolating extensions doc (python#103516)
  pythongh-103406: Modernize pos-only arguments usage in `test_signature` (python#103407)
  Proofread howto/perf_profiling.rst (python#103530)
  Fix unused functions warnings in instrumentation.c (pythonGH-103515)
carljm added a commit to carljm/cpython that referenced this pull request Apr 14, 2023
* superopt:
  fix incompatible types
  update generated cases
  don't unnecessarily re-find args in error case
  Apply suggestions from code review
  pythongh-103532: Remove TKINTER_PROTECT_LOADTK code (pythonGH-103535)
  pythongh-103180: Add CI timeouts to all GitHub Actions jobs (python#103437)
  Remove double space in import error message (python#103458)
  ipaddress: Remove non-existent ip_str param from docstring (python#103461)
  Fix syntax typo in isolating extensions doc (python#103516)
  pythongh-103406: Modernize pos-only arguments usage in `test_signature` (python#103407)
  Proofread howto/perf_profiling.rst (python#103530)
  Fix unused functions warnings in instrumentation.c (pythonGH-103515)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants