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

ICU-22604 Use 'void' for empty C parameter lists (-Wstrict-prototypes) #2744

Merged
merged 1 commit into from
Dec 19, 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
2 changes: 1 addition & 1 deletion icu4c/source/common/ucase.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ enum {
/* definitions for 16-bit case properties word ------------------------------ */

U_CFUNC const UTrie2 * U_EXPORT2
ucase_getTrie();
ucase_getTrie(void);

/* 2-bit constants for types of cased characters */
#define UCASE_TYPE_MASK 3
Expand Down
2 changes: 1 addition & 1 deletion icu4c/source/common/unicode/ulocbuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef struct ULocaleBuilder ULocaleBuilder;
* @draft ICU 74
*/
U_CAPI ULocaleBuilder* U_EXPORT2
ulocbld_open();
ulocbld_open(void);

/**
* Close the builder and destroy it's internal states.
Expand Down
4 changes: 2 additions & 2 deletions icu4c/source/samples/cal/cal.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ main(int argc,

/* Usage information */
static void
usage()
usage(void)
{
puts("Usage: icucal [OPTIONS] [[MONTH] YEAR]");
puts("");
Expand All @@ -219,7 +219,7 @@ usage()

/* Version information */
static void
version()
version(void)
{
printf("icucal version %s (ICU version %s), created by Stephen F. Booth.\n",
CAL_VERSION, U_ICU_VERSION);
Expand Down
4 changes: 2 additions & 2 deletions icu4c/source/samples/date/date.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ main(int argc,

/* Usage information */
static void
usage()
usage(void)
{
puts("Usage: icudate [OPTIONS]");
puts("Options:");
Expand All @@ -207,7 +207,7 @@ usage()

/* Version information */
static void
version()
version(void)
{
UErrorCode status = U_ZERO_ERROR;
const char *tzVer;
Expand Down
2 changes: 1 addition & 1 deletion icu4c/source/samples/layout/gnomeglue.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef void fm_fontMap;

U_CDECL_BEGIN

gs_guiSupport *gs_gnomeGuiSupportOpen();
gs_guiSupport *gs_gnomeGuiSupportOpen(void);
void gs_gnomeGuiSupportClose(gs_guiSupport *guiSupport);

rs_surface *rs_gnomeRenderingSurfaceOpen(GtkWidget *theWidget);
Expand Down
14 changes: 7 additions & 7 deletions icu4c/source/test/cintltst/callcoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ void genericRulesStarter(const char *rules, const char * const s[], uint32_t siz
genericRulesStarterWithResult(rules, s, size, UCOL_LESS);
}

static void TestTertiary()
static void TestTertiary(void)
{
int32_t len,i;
UCollator *myCollation;
Expand All @@ -764,7 +764,7 @@ static void TestTertiary()
myCollation = 0;
}

static void TestPrimary( )
static void TestPrimary(void)
{
int32_t len,i;
UCollator *myCollation;
Expand All @@ -790,7 +790,7 @@ static void TestPrimary( )
myCollation = 0;
}

static void TestSecondary()
static void TestSecondary(void)
{
int32_t i;
int32_t len;
Expand All @@ -815,7 +815,7 @@ static void TestSecondary()
myCollation = 0;
}

static void TestIdentical()
static void TestIdentical(void)
{
int32_t i;
int32_t len;
Expand All @@ -839,7 +839,7 @@ static void TestIdentical()
myCollation = 0;
}

static void TestExtra()
static void TestExtra(void)
{
int32_t i, j;
int32_t len;
Expand Down Expand Up @@ -1173,7 +1173,7 @@ static void TestSurrogates(void)
*
*/
static void
TestInvalidRules(){
TestInvalidRules(void){
#define MAX_ERROR_STATES 2

static const char* rulesArr[MAX_ERROR_STATES] = {
Expand Down Expand Up @@ -1219,7 +1219,7 @@ TestInvalidRules(){
}

static void
TestJitterbug1098(){
TestJitterbug1098(void){
UChar rule[1000];
UCollator* c1 = NULL;
UErrorCode status = U_ZERO_ERROR;
Expand Down
32 changes: 16 additions & 16 deletions icu4c/source/test/cintltst/capitst.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ void TestGetDefaultRules(){
/* Collator Properties
ucol_open, ucol_strcoll, getStrength/setStrength
getDecomposition/setDecomposition, getDisplayName*/
void TestProperty()
void TestProperty(void)
{
UCollator *col, *ruled;
const UChar *rules;
Expand Down Expand Up @@ -449,7 +449,7 @@ void TestProperty()
}

/* Test RuleBasedCollator and getRules*/
void TestRuleBasedColl()
void TestRuleBasedColl(void)
{
UCollator *col1, *col2, *col3, *col4;
UCollationElements *iter1, *iter2;
Expand Down Expand Up @@ -562,7 +562,7 @@ void TestRuleBasedColl()
ucol_close(col1);
}

void TestCompare()
void TestCompare(void)
{
UErrorCode status = U_ZERO_ERROR;
UCollator *col;
Expand Down Expand Up @@ -612,7 +612,7 @@ void TestCompare()
---------------------------------------------
tests decomposition setting
*/
void TestDecomposition() {
void TestDecomposition(void) {
UErrorCode status = U_ZERO_ERROR;
UCollator *en_US, *el_GR, *vi_VN;
en_US = ucol_open("en_US", &status);
Expand Down Expand Up @@ -651,7 +651,7 @@ void TestDecomposition() {

#define CLONETEST_COLLATOR_COUNT 4

void TestSafeClone() {
void TestSafeClone(void) {
UChar test1[6];
UChar test2[6];
static const UChar umlautUStr[] = {0x00DC, 0};
Expand Down Expand Up @@ -808,7 +808,7 @@ void TestSafeClone() {
}
}

void TestClone() {
void TestClone(void) {
UChar test1[6];
UChar test2[6];
static const UChar umlautUStr[] = {0x00DC, 0};
Expand Down Expand Up @@ -926,7 +926,7 @@ void TestClone() {
}
}

void TestCloneBinary(){
void TestCloneBinary(void){
UErrorCode err = U_ZERO_ERROR;
UCollator * col = ucol_open("en_US", &err);
UCollator * c;
Expand Down Expand Up @@ -1046,7 +1046,7 @@ static void TestBengaliSortKey(void)
TestOpenVsOpenRules ensures that collators from ucol_open and ucol_openRules
will generate identical sort keys
*/
void TestOpenVsOpenRules(){
void TestOpenVsOpenRules(void){

/* create an array of all the locales */
int32_t numLocales = uloc_countAvailable();
Expand Down Expand Up @@ -1189,7 +1189,7 @@ void TestOpenVsOpenRules(){
----------------------------------------------------------------------------
ctor -- Tests the getSortKey
*/
void TestSortKey()
void TestSortKey(void)
{
uint8_t *sortk1 = NULL, *sortk2 = NULL, *sortk3 = NULL, *sortkEmpty = NULL;
int32_t sortklen, osortklen;
Expand Down Expand Up @@ -1334,7 +1334,7 @@ void TestSortKey()
free(sortk2);

}
void TestHashCode()
void TestHashCode(void)
{
uint8_t *sortk1, *sortk2, *sortk3;
int32_t sortk1len, sortk2len, sortk3len;
Expand Down Expand Up @@ -1388,7 +1388,7 @@ void TestHashCode()
* Tests the UCollatorElements API.
*
*/
void TestElemIter()
void TestElemIter(void)
{
int32_t offset;
int32_t order1, order2, order3;
Expand Down Expand Up @@ -1518,7 +1518,7 @@ doAssert( (ucol_tertiaryOrder(order1) != ucol_tertiaryOrder(order3)), "The terti
log_verbose("testing CollationElementIterator ends...\n");
}

void TestGetLocale() {
void TestGetLocale(void) {
UErrorCode status = U_ZERO_ERROR;
const char *rules = "&a<x<y<z";
UChar rlz[256] = {0};
Expand Down Expand Up @@ -1619,7 +1619,7 @@ void TestGetLocale() {
}


void TestGetAll()
void TestGetAll(void)
{
int32_t i, count;
count=ucol_countAvailable();
Expand All @@ -1646,7 +1646,7 @@ static int compare_teststruct(const void *string1, const void *string2) {
return(strcmp((const char *)((struct teststruct *)string1)->key, (const char *)((struct teststruct *)string2)->key));
}

void TestBounds() {
void TestBounds(void) {
UErrorCode status = U_ZERO_ERROR;

UCollator *coll = ucol_open("sh", &status);
Expand Down Expand Up @@ -1861,7 +1861,7 @@ void TestSortKeyBufferOverrun(void) {
ucol_close(coll);
}

static void TestAttribute()
static void TestAttribute(void)
{
UErrorCode error = U_ZERO_ERROR;
UCollator *coll = ucol_open(NULL, &error);
Expand Down Expand Up @@ -1964,7 +1964,7 @@ static void TestAttribute()
ucol_close(coll);
}

void TestGetTailoredSet() {
void TestGetTailoredSet(void) {
struct {
const char *rules;
const char *tests[20];
Expand Down
8 changes: 4 additions & 4 deletions icu4c/source/test/cintltst/cbiapts.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static void freeToUCharStrings(void **hook) {


#if !UCONFIG_NO_FILE_IO
static void TestBreakIteratorCAPI()
static void TestBreakIteratorCAPI(void)
{
UErrorCode status = U_ZERO_ERROR;
UBreakIterator *word, *sentence, *line, *character, *b, *bogus;
Expand Down Expand Up @@ -633,7 +633,7 @@ static UBreakIterator * testOpenRules(char *rules) {
* TestBreakIteratorRules - Verify that a break iterator can be created from
* a set of source rules.
*/
static void TestBreakIteratorRules() {
static void TestBreakIteratorRules(void) {
/* Rules will keep together any run of letters not including 'a', OR
* keep together 'abc', but only when followed by 'def', OTHERWISE
* just return one char at a time.
Expand Down Expand Up @@ -720,7 +720,7 @@ static void TestBreakIteratorRules() {
ubrk_close(bi);
}

static void TestBreakIteratorRuleError() {
static void TestBreakIteratorRuleError(void) {
/*
* TestBreakIteratorRuleError - Try to create a BI from rules with syntax errors,
* check that the error is reported correctly.
Expand Down Expand Up @@ -754,7 +754,7 @@ static void TestBreakIteratorRuleError() {
/*
* TestsBreakIteratorStatusVals() Test the ubrk_getRuleStatusVec() function
*/
static void TestBreakIteratorStatusVec() {
static void TestBreakIteratorStatusVec(void) {
#define RULE_STRING_LENGTH 200
UChar rules[RULE_STRING_LENGTH];

Expand Down
Loading
Loading