Hello - Is there a pragma directive that will make a function be ignored? I have a function that is not currently being used and it creates a warning. I would like to fix the warning by using pragma, if possible but all I have tried isn't working...
for example i tried:
#pragma function(myFunc t) //didn't work
If pragma won't work - what is the best trick to have the compiler "ignore" a function that's not being used?
thanks!
4 2362 JosAH 11,448
Recognized Expert MVP
If your function definition and declaration is out of the way, simply do this: -
#define your_function(dummy, params, here)
-
This removes all the function calls from the rest of your code.
kind regards,
Jos
If your function definition and declaration is out of the way, simply do this: -
#define your_function(dummy, params, here)
-
This removes all the function calls from the rest of your code.
kind regards,
Jos
Sorry, but I get an error after I try that, because one of my parameters is a pointer...here is kinda of what i have... -
static void setCount( inst *countPtr, int loopCount) {
-
*countPtr = (loopCount);
-
}
-
i have also tried something called _attribute_ ((unused)) that didn't work.
please advise...thanks !
Not sure if this will work for what you need, but could you comment it out?
JosAH 11,448
Recognized Expert MVP
Sorry, but I get an error after I try that, because one of my parameters is a pointer...here is kinda of what i have... -
static void setCount( inst *countPtr, int loopCount) {
-
*countPtr = (loopCount);
-
}
-
i have also tried something called _attribute_ ((unused)) that didn't work.
please advise...thanks !
Didn't you read what I wrote? Get that definition out of the way then my
suggestion works fine. Simply comment out that definition as well.
kind regards,
Jos
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: BCC |
last post by:
Hi,
This is kind of a followup to a previous question...
I have a container class that has a load of variables (~100).
For example, I have groupings like this:
class CContainer {
m_circle_area;
m_circle_position;
|
by: Peter Foti |
last post by:
Simple question... which is better to use for defining font sizes and why?
px and em seem to be the leading candidates. I know what the general answer
is going to be, but I'm hoping to ultimately get some good real world
examples.
Fire away! :)
Regards,
Peter Foti
|
by: Chuck Ritzke |
last post by:
I keep asking myself this question as I write class modules. What's the
best/smartest/most efficient way to send a large object back and forth to a
class module?
For example, say I have a data access module that creates a large
disconnected dataset from a database. I want to pass that dataset back to
the calling program. And then perhaps I want to send that dataset to another
class module.
At first it seems that the "object oriented"...
|
by: Adriano Coser |
last post by:
I'm getting the following error:
error C3767: PictureSource - candidate function(s) not accessible
when accessing a public member function of a managed class, either
from managed or unmanaged code. The class is an owner draw control
implemented into a Control Library. The access is on a DLLs that
support CLR with old syntax.
The code compiled OK on Beta-1.
|
by: H.B. |
last post by:
Hi,
I need to make a function that can display data on my Managed C++ app and be
called by an unmanaged C++ DLL. Something like :
void Form1::Form1_Load(System::Object * sender, System::EventArgs * e)
{
MyDLLInit(MyAppDisplayFunction);
}
| |
by: Steve |
last post by:
I have to develop several large and complex C++ hardware test programs that
should work under DOS, most likely with 32-bit DOS extender. Development
workstation OS would be Microsoft XP. Quite some time ago I worked in DOS,
with Borland BC++ 4.1. I do not have it any more. Which compiler would you
recommend me now? Which ones support serious DOS program development?
Criterion should be number of available free library modules (graphic menu...
|
by: Russell |
last post by:
Hey,
ok i have numerous tables to search through for a 'site search'.
some of the searchble fields have html embeded within so after some quick
referencing, saw I can use the regExp function to strip out all the HTML
leaving only the raw text.
(done and works a treat)
My issue is:
|
by: Jim |
last post by:
Hi guys,
I have an object which represents an "item" in a CMS "component" where
an "item" in the most basic form just a field, and a "component" is
effectively a table.
"item" objects can be created and then added to "component" objects to
build up the component definition.
My dilemma comes in deciding how to read/write data to the "item"
|
by: David Mark |
last post by:
I've got a collection of functions that accept a function or object
(paired with a method name) as a callback.
For the longest time I have relied on this test.
(typeof cb == 'function')
This should work as well, but I am not sure how well it degrades in
older browsers. I think there are issues with functions created in
another context (eg frame) as well.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |