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

A function decl without a prototype is deprecated in all versions of C #312

Merged
merged 1 commit into from
Jul 21, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void rcm_setActiveMonitors(RollbarCrashMonitorType monitorTypes)
g_activeMonitors = activeMonitors;
}

RollbarCrashMonitorType rcm_getActiveMonitors()
RollbarCrashMonitorType rcm_getActiveMonitors(void)
{
return g_activeMonitors;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static int addJSONData(const char* const data, const int length, void* const use
#pragma mark - Utility -
// ============================================================================

static double getCurrentTime()
static double getCurrentTime(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
Expand Down Expand Up @@ -352,7 +352,7 @@ void rcstate_initialize(const char* const stateFilePath)
loadState(g_stateFilePath);
}

bool rcstate_reset()
bool rcstate_reset(void)
{
if(g_isEnabled)
{
Expand Down Expand Up @@ -472,7 +472,7 @@ static void setEnabled(bool isEnabled)
}
}

static bool isEnabled()
static bool isEnabled(void)
{
return g_isEnabled;
}
Expand All @@ -498,7 +498,7 @@ static void addContextualInfoToEvent(RollbarCrash_MonitorContext* eventContext)
}
}

RollbarCrashMonitorAPI* rcm_appstate_getAPI()
RollbarCrashMonitorAPI* rcm_appstate_getAPI(void)
{
static RollbarCrashMonitorAPI api =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ - (void) runMonitor
#pragma mark - API -
// ============================================================================

static void initialize()
static void initialize(void)
{
static bool isInitialized = false;
if(!isInitialized)
Expand Down Expand Up @@ -202,12 +202,12 @@ static void setEnabled(bool isEnabled)
}
}

static bool isEnabled()
static bool isEnabled(void)
{
return g_isEnabled;
}

RollbarCrashMonitorAPI* rcm_deadlock_getAPI()
RollbarCrashMonitorAPI* rcm_deadlock_getAPI(void)
{
static RollbarCrashMonitorAPI api =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ static void* handleExceptions(void* const userData)
#pragma mark - API -
// ============================================================================

static void uninstallExceptionHandler()
static void uninstallExceptionHandler(void)
{
RCLOG_DEBUG("Uninstalling mach exception handler.");

Expand Down Expand Up @@ -444,7 +444,7 @@ static void uninstallExceptionHandler()
RCLOG_DEBUG("Mach exception handlers uninstalled.");
}

static bool installExceptionHandler()
static bool installExceptionHandler(void)
{
RCLOG_DEBUG("Installing mach exception handler.");

Expand Down Expand Up @@ -576,7 +576,7 @@ static void setEnabled(bool isEnabled)
}
}

static bool isEnabled()
static bool isEnabled(void)
{
return g_isEnabled;
}
Expand All @@ -595,7 +595,7 @@ static void addContextualInfoToEvent(struct RollbarCrash_MonitorContext* eventCo

#endif

RollbarCrashMonitorAPI* rcm_machexception_getAPI()
RollbarCrashMonitorAPI* rcm_machexception_getAPI(void)
{
static RollbarCrashMonitorAPI api =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ static void setEnabled(bool isEnabled)
}
}

static bool isEnabled()
static bool isEnabled(void)
{
return g_isEnabled;
}

RollbarCrashMonitorAPI* rcm_nsexception_getAPI()
RollbarCrashMonitorAPI* rcm_nsexception_getAPI(void)
{
static RollbarCrashMonitorAPI api =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static void handleSignal(int sigNum, siginfo_t* signalInfo, void* userContext)
#pragma mark - API -
// ============================================================================

static bool installSignalHandler()
static bool installSignalHandler(void)
{
RCLOG_DEBUG("Installing signal handler.");

Expand Down Expand Up @@ -226,7 +226,7 @@ static void setEnabled(bool isEnabled)
}
}

static bool isEnabled()
static bool isEnabled(void)
{
return g_isEnabled;
}
Expand All @@ -241,7 +241,7 @@ static void addContextualInfoToEvent(struct RollbarCrash_MonitorContext* eventCo

#endif

RollbarCrashMonitorAPI* rcm_signal_getAPI()
RollbarCrashMonitorAPI* rcm_signal_getAPI(void)
{
static RollbarCrashMonitorAPI api =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static uint64_t usableMemory(void)
*
* @return Executable path.
*/
static NSString* getExecutablePath()
static NSString* getExecutablePath(void)
{
NSBundle* mainBundle = [NSBundle mainBundle];
NSDictionary* infoDict = [mainBundle infoDictionary];
Expand All @@ -246,7 +246,7 @@ static uint64_t usableMemory(void)
*
* @return The UUID.
*/
static const char* getAppUUID()
static const char* getAppUUID(void)
{
const char* result = nil;

Expand Down Expand Up @@ -318,7 +318,7 @@ static uint64_t usableMemory(void)
return NULL;
}

static const char* getCurrentCPUArch()
static const char* getCurrentCPUArch(void)
{
const char* result = getCPUArchForCPUType(rcsysctl_int32ForName("hw.cputype"),
rcsysctl_int32ForName("hw.cpusubtype"));
Expand All @@ -334,7 +334,7 @@ static uint64_t usableMemory(void)
*
* @return YES if the device is jailbroken.
*/
static bool isJailbroken()
static bool isJailbroken(void)
{
return rcdl_imageNamed("MobileSubstrate", false) != UINT32_MAX;
}
Expand All @@ -343,7 +343,7 @@ static bool isJailbroken()
*
* @return YES if the app was built in debug mode.
*/
static bool isDebugBuild()
static bool isDebugBuild(void)
{
#ifdef DEBUG
return YES;
Expand All @@ -356,7 +356,7 @@ static bool isDebugBuild()
*
* @return YES if this is a simulator build.
*/
static bool isSimulatorBuild()
static bool isSimulatorBuild(void)
{
#if TARGET_OS_SIMULATOR
return YES;
Expand All @@ -369,7 +369,7 @@ static bool isSimulatorBuild()
*
* @return App Store receipt for iOS 7+, nil otherwise.
*/
static NSString* getReceiptUrlPath()
static NSString* getReceiptUrlPath(void)
{
NSString* path = nil;
#if RollbarCrashCRASH_HOST_IOS
Expand All @@ -393,7 +393,7 @@ static bool isSimulatorBuild()
*
* @return The stringified hex representation of the hash for this device + app.
*/
static const char* getDeviceAndAppHash()
static const char* getDeviceAndAppHash(void)
{
NSMutableData* data = nil;

Expand Down Expand Up @@ -441,7 +441,7 @@ static bool isSimulatorBuild()
*
* @return YES if this is a testing build.
*/
static bool isTestBuild()
static bool isTestBuild(void)
{
return [getReceiptUrlPath().lastPathComponent isEqualToString:@"sandboxReceipt"];
}
Expand All @@ -451,7 +451,7 @@ static bool isTestBuild()
*
* @return YES if there is an app store receipt.
*/
static bool hasAppStoreReceipt()
static bool hasAppStoreReceipt(void)
{
NSString* receiptPath = getReceiptUrlPath();
if(receiptPath == nil)
Expand All @@ -464,7 +464,7 @@ static bool hasAppStoreReceipt()
return isAppStoreReceipt && receiptExists;
}

static const char* getBuildType()
static const char* getBuildType(void)
{
if(isSimulatorBuild())
{
Expand All @@ -485,7 +485,7 @@ static bool hasAppStoreReceipt()
return "unknown";
}

static uint64_t getStorageSize()
static uint64_t getStorageSize(void)
{
NSNumber* storageSize = [[[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:nil] objectForKey:NSFileSystemSize];
return storageSize.unsignedLongLongValue;
Expand All @@ -495,7 +495,7 @@ static uint64_t getStorageSize()
#pragma mark - API -
// ============================================================================

static void initialize()
static void initialize(void)
{
static bool isInitialized = false;
if(!isInitialized)
Expand Down Expand Up @@ -588,7 +588,7 @@ static void setEnabled(bool isEnabled)
}
}

static bool isEnabled()
static bool isEnabled(void)
{
return g_isEnabled;
}
Expand Down Expand Up @@ -632,7 +632,7 @@ static void addContextualInfoToEvent(RollbarCrash_MonitorContext* eventContext)
}
}

RollbarCrashMonitorAPI* rcm_system_getAPI()
RollbarCrashMonitorAPI* rcm_system_getAPI(void)
{
static RollbarCrashMonitorAPI api =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ static void setEnabled(bool isEnabled)
g_isEnabled = isEnabled;
}

static bool isEnabled()
static bool isEnabled(void)
{
return g_isEnabled;
}

RollbarCrashMonitorAPI* rcm_user_getAPI()
RollbarCrashMonitorAPI* rcm_user_getAPI(void)
{
static RollbarCrashMonitorAPI api =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static void handleDealloc_ ## CLASS(id self, SEL _cmd) \
fn f = (fn)g_originalDealloc_ ## CLASS; \
f(self, _cmd); \
} \
static void installDealloc_ ## CLASS() \
static void installDealloc_ ## CLASS(void) \
{ \
Method method = class_getInstanceMethod(objc_getClass(#CLASS), sel_registerName("dealloc")); \
g_originalDealloc_ ## CLASS = method_getImplementation(method); \
Expand All @@ -154,7 +154,7 @@ static void installDealloc_ ## CLASS() \
CREATE_ZOMBIE_HANDLER_INSTALLER(NSObject)
CREATE_ZOMBIE_HANDLER_INSTALLER(NSProxy)

static void install()
static void install(void)
{
unsigned cacheSize = CACHE_SIZE;
g_zombieHashMask = cacheSize - 1;
Expand Down Expand Up @@ -224,7 +224,7 @@ static void setEnabled(bool isEnabled)
}
}

static bool isEnabled()
static bool isEnabled(void)
{
return g_isEnabled;
}
Expand All @@ -239,7 +239,7 @@ static void addContextualInfoToEvent(RollbarCrash_MonitorContext* eventContext)
}
}

RollbarCrashMonitorAPI* rcm_zombie_getAPI()
RollbarCrashMonitorAPI* rcm_zombie_getAPI(void)
{
static RollbarCrashMonitorAPI api =
{
Expand Down
4 changes: 2 additions & 2 deletions RollbarNotifier/Sources/RollbarCrash/Recording/RollbarCrash.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ @interface RollbarCrash ()
@end


static NSString* getBundleName()
static NSString* getBundleName(void)
{
NSString* bundleName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
if(bundleName == nil)
Expand All @@ -68,7 +68,7 @@ @interface RollbarCrash ()
return bundleName;
}

static NSString* getBasePath()
static NSString* getBasePath(void)
{
NSArray* directories = NSSearchPathForDirectoriesInDomains(NSCachesDirectory,
NSUserDomainMask,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ void rc_notifyAppCrash(void)
rcstate_notifyAppCrash();
}

int rc_getReportCount()
int rc_getReportCount(void)
{
return rccrs_getReportCount();
}
Expand Down Expand Up @@ -365,7 +365,7 @@ int64_t rc_addUserReport(const char* report, int reportLength)
return rccrs_addUserReport(report, reportLength);
}

void rc_deleteAllReports()
void rc_deleteAllReports(void)
{
rccrs_deleteAllReports();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static _Atomic(int) g_semaphoreCount;
static bool g_searchQueueNames = false;
static bool g_hasThreadStarted = false;

static void updateThreadList()
static void updateThreadList(void)
{
const task_t thisTask = mach_task_self();
int oldThreadsCount = g_allThreadsCount;
Expand Down Expand Up @@ -185,7 +185,7 @@ void rcccd_init(int pollingIntervalInSeconds)
pthread_attr_destroy(&attr);
}

void rcccd_freeze()
void rcccd_freeze(void)
{
if(g_semaphoreCount++ <= 0)
{
Expand All @@ -194,7 +194,7 @@ void rcccd_freeze()
}
}

void rcccd_unfreeze()
void rcccd_unfreeze(void)
{
if(--g_semaphoreCount < 0)
{
Expand Down
Loading