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 pragmas #3298

Merged
merged 4 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/emc/usr_intf/axis/extensions/_toglmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PyObject *install(PyObject *s, PyObject *arg) {

PyMethodDef togl_methods[] = {
{"install", (PyCFunction)install, METH_O, "install togl in a tkinter application"},
{NULL}
{}
};

static struct PyModuleDef togl_moduledef = {
Expand Down
4 changes: 0 additions & 4 deletions src/hal/halmodule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1829,9 +1829,6 @@ PyObject *stream_element_types(PyObject *_self, void *unused) {
return self->pyelt;
}

// "deprecated conversion from string constant to 'char *'" occurs due to
// missing const-qualifications in Python headers
#pragma GCC diagnostic ignored "-Wwrite-strings"
static PyMemberDef stream_members[] = {
{"sampleno", T_UINT, offsetof(streamobj, sampleno), READONLY,
"The number of the last successfully read sample"},
Expand All @@ -1848,7 +1845,6 @@ static PyGetSetDef stream_getset[] = {
{"num_overruns", stream_getter<int>, NULL, NULL, VFC(hal_stream_num_overruns)},
{}
};
#pragma GCC diagnostic warning "-Wwrite-strings"

static void pystream_delete(PyObject *_self) {
streamobj *self = reinterpret_cast<streamobj*>(_self);
Expand Down
4 changes: 3 additions & 1 deletion src/hal/user_comps/xhc-whb04b-6/hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
02111-1307 USA.
*/

#pragma once
#ifndef __XHC_WHB04B_6_HAL_H
#define __XHC_WHB04B_6_HAL_H

// local includes
#include "pendant-types.h"
Expand Down Expand Up @@ -642,3 +643,4 @@ class Hal
bool requestMode(bool isRisingEdge, hal_bit_t* requestPin, hal_bit_t* modeFeedbackPin);
};
}
#endif
4 changes: 3 additions & 1 deletion src/hal/user_comps/xhc-whb04b-6/pendant-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
02111-1307 USA.
*/

#pragma once
#ifndef __XHC_WHB04B_6_PENDANT_TYPES_H
#define __XHC_WHB04B_6_PENDANT_TYPES_H

// system includes
#include <stdint.h>
Expand Down Expand Up @@ -85,3 +86,4 @@ class HandWheelCounters

std::ostream& operator<<(std::ostream& os, const HandWheelCounters& data);
}
#endif
4 changes: 3 additions & 1 deletion src/hal/user_comps/xhc-whb04b-6/pendant.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
02111-1307 USA.
*/

#pragma once
#ifndef __XHC_WHB04B_6_PENDANT_H
#define __XHC_WHB04B_6_PENDANT_H

// local includes
#include "pendant-types.h"
Expand Down Expand Up @@ -611,3 +612,4 @@ class Pendant : public KeyEventListener
// ----------------------------------------------------------------------
std::ostream& operator<<(std::ostream& os, const Pendant& data);
}
#endif
4 changes: 3 additions & 1 deletion src/hal/user_comps/xhc-whb04b-6/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
02111-1307 USA.
*/

#pragma once
#ifndef __XHC_WHB04B_6_USB_H
#define __XHC_WHB04B_6_USB_H

// system includes
#include <stdint.h>
Expand Down Expand Up @@ -336,3 +337,4 @@ std::ostream& operator<<(std::ostream& os, const UsbOutPackageData& data);
std::ostream& operator<<(std::ostream& os, const UsbOutPackageBlockFields& block);
std::ostream& operator<<(std::ostream& os, const UsbOutPackageBlocks& blocks);
}
#endif
4 changes: 3 additions & 1 deletion src/hal/user_comps/xhc-whb04b-6/xhc-whb04b6.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
02111-1307 USA.
*/

#pragma once
#ifndef __XHC_WHB04B_6_XHC_WHB04B6_H
#define __XHC_WHB04B_6_XHC_WHB04B6_H

// system includes
#include <stdint.h>
Expand Down Expand Up @@ -110,3 +111,4 @@ class XhcWhb04b6Component :
void printHexdump(const UsbInPackage& inPackage);
};
}
#endif
5 changes: 0 additions & 5 deletions src/libnml/buffer/tcpmem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
* Last change:
********************************************************************/

#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)))
#pragma GCC optimize "-fno-strict-aliasing"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif

#ifdef __cplusplus
extern "C" {
#endif
Expand Down