Navigation Menu

Skip to content

Commit

Permalink
Tidy up some compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pbevin committed Dec 22, 2013
1 parent 205dbc3 commit 16e7acc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
12 changes: 6 additions & 6 deletions eu018.c
Expand Up @@ -19,14 +19,14 @@ void eu018(char *ans) {
63 66 04 68 89 53 67 30 73 16 69 87 40 31 \
04 62 98 27 23 09 70 98 73 93 38 53 60 04 23";
int n = 0;
int *maxima = malloc(N*sizeof(int));
int *row = malloc(N*sizeof(int));
int *maxima = malloc(N * sizeof(int));
int *row = malloc(N * sizeof(int));

memset(maxima, 0, sizeof(maxima));
memset(maxima, 0, N * sizeof(int));
for (int i = 0; i < N; i++) {
int *newmax = malloc(N*sizeof(int));
memset(newmax, 0, sizeof(newmax));
memset(row, 0, sizeof(row));
int *newmax = malloc(N * sizeof(int));
memset(newmax, 0, N * sizeof(int));
memset(row, 0, N * sizeof(int));
for (int j = 0; j <= i; j++) {
row[j] = atoi(data + 3 * n);
n++;
Expand Down
2 changes: 0 additions & 2 deletions eu066.c
@@ -1,7 +1,5 @@
#include "euler.h"

static char buf[10000];

static int issquare(int n) {
int sqrtn = sqrt(n);
if (sqrtn * sqrtn == n)
Expand Down
3 changes: 1 addition & 2 deletions eu069.c
Expand Up @@ -10,8 +10,7 @@ void eu069(char *ans) {
// is less than 1,000,000.

static int primes[50];
int nprimes;
nprimes = genprimes(primes, 50);
genprimes(primes, 50);

int product = 1;

Expand Down

0 comments on commit 16e7acc

Please sign in to comment.